Skip to content

Commit a2bea82

Browse files
committed
panel: Fix a few more spots using panel.height directly.
1 parent 85e6d5e commit a2bea82

3 files changed

Lines changed: 16 additions & 16 deletions

File tree

js/ui/layout.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -426,21 +426,21 @@ var LayoutManager = GObject.registerClass({
426426
switch (panel.panelPosition) {
427427
case Panel.PanelLoc.top:
428428
if (top) {
429-
kb_height -= panel.actor.height;
430-
kb_y += panel.actor.height;
429+
kb_height -= panel.get_height();
430+
kb_y += panel.get_height();
431431
}
432432
break;
433433
case Panel.PanelLoc.bottom:
434434
if (!top) {
435-
kb_height -= panel.actor.height;
435+
kb_height -= panel.get_height();
436436
}
437437
break;
438438
case Panel.PanelLoc.left:
439-
kb_x += panel.actor.width;
440-
kb_width -= panel.actor.width;
439+
kb_x += panel.get_width();
440+
kb_width -= panel.get_width();
441441
break;
442442
case Panel.PanelLoc.right:
443-
kb_width -= panel.actor.width;
443+
kb_width -= panel.get_width();
444444
break;
445445
}
446446
}

js/ui/popupMenu.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2013,10 +2013,10 @@ var PopupMenu = class PopupMenu extends PopupMenuBase {
20132013

20142014
for (let panel of panels) {
20152015
if (panel.panelPosition == PanelLoc.top || panel.panelPosition == PanelLoc.bottom) {
2016-
maxHeight -= panel.actor.height;
2016+
maxHeight -= panel.get_height();
20172017
}
20182018
else {
2019-
maxWidth -= panel.actor.width;
2019+
maxWidth -= panel.get_width();
20202020
}
20212021
}
20222022

@@ -2047,16 +2047,16 @@ var PopupMenu = class PopupMenu extends PopupMenuBase {
20472047
if (!panel.getIsVisible()) continue;
20482048
switch (panel.panelPosition) {
20492049
case PanelLoc.top:
2050-
y1 += panel.actor.height;
2050+
y1 += panel.get_height();
20512051
break;
20522052
case PanelLoc.bottom:
2053-
y2 -= panel.actor.height;
2053+
y2 -= panel.get_height();
20542054
break;
20552055
case PanelLoc.left:
2056-
x1 += panel.actor.width;
2056+
x1 += panel.get_width();
20572057
break;
20582058
case PanelLoc.right:
2059-
x2 -= panel.actor.width;
2059+
x2 -= panel.get_width();
20602060
break;
20612061
}
20622062
}

js/ui/tooltips.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,14 +356,14 @@ PanelItemTooltip.prototype = {
356356
switch (this.orientation) {
357357
case St.Side.BOTTOM:
358358
panel = Main.panelManager.getPanel(monitor.index, PanelLoc.bottom);
359-
tooltipTop = monitor.y + monitor.height - tooltipHeight - panel.actor.height;
359+
tooltipTop = monitor.y + monitor.height - tooltipHeight - panel.get_height();
360360
tooltipLeft = this.mousePosition[0] - Math.round(tooltipWidth / 2);
361361
tooltipLeft = Math.max(tooltipLeft, monitor.x);
362362
tooltipLeft = Math.min(tooltipLeft, monitor.x + monitor.width - tooltipWidth);
363363
break;
364364
case St.Side.TOP:
365365
panel = Main.panelManager.getPanel(monitor.index, PanelLoc.top);
366-
tooltipTop = monitor.y + panel.actor.height;
366+
tooltipTop = monitor.y + panel.get_height();
367367
tooltipLeft = this.mousePosition[0] - Math.round(tooltipWidth / 2);
368368
tooltipLeft = Math.max(tooltipLeft, monitor.x);
369369
tooltipLeft = Math.min(tooltipLeft, monitor.x + monitor.width - tooltipWidth);
@@ -381,7 +381,7 @@ PanelItemTooltip.prototype = {
381381
tooltipTop = monitor.y + monitor.height - tooltipHeight;
382382
}
383383

384-
tooltipLeft = monitor.x + panel.actor.width;
384+
tooltipLeft = monitor.x + panel.get_width();
385385
break;
386386
case St.Side.RIGHT:
387387
panel = Main.panelManager.getPanel(monitor.index, PanelLoc.right);
@@ -396,7 +396,7 @@ PanelItemTooltip.prototype = {
396396
tooltipTop = monitor.y + monitor.height - tooltipHeight;
397397
}
398398

399-
tooltipLeft = monitor.x + monitor.width - tooltipWidth - panel.actor.width;
399+
tooltipLeft = monitor.x + monitor.width - tooltipWidth - panel.get_width();
400400
break;
401401
default:
402402
break;

0 commit comments

Comments
 (0)