Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ debian/files
debian/tmp/
obj-x86_64-linux-gnu
*.pyc
.cache
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ class Calendar {
}
}

_allocate_dot_box (actor, box, flags) {
_allocate_dot_box (actor, box) {
let children = actor.get_children();

if (children.length == 0) {
Expand Down Expand Up @@ -567,7 +567,7 @@ class Calendar {
cbox.y2 = cbox.y1 + nh;

while (i < ((dot_row * max_children_per_row) + dots_this_row)) {
children[i].allocate(cbox, flags);
children[i].allocate(cbox);

cbox.x1 += nw;
cbox.x2 += nw;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ class AppGroup {
alloc.natural_size = Math.max(iconNaturalSize, labelNaturalSize);
}

allocate(actor, box, flags) {
allocate(actor, box) {
const allocWidth = box.x2 - box.x1;
const allocHeight = box.y2 - box.y1;
const childBox = new Clutter.ActorBox();
Expand All @@ -430,7 +430,7 @@ class AppGroup {
[childBox.x1, childBox.x2] = center(allocWidth + offset, naturalWidth);
}

this.iconBox.allocate(childBox, flags);
this.iconBox.allocate(childBox);

// Set windows badge position
const windowBadgeOffset = 3 * global.ui_scale;
Expand All @@ -446,7 +446,7 @@ class AppGroup {
const windowLabelPosY = Math.floor((windowBadgesize - wLabelNaturalHeight) / 2);
this.windowsBadgeLabel.set_anchor_point(-windowLabelPosX, -windowLabelPosY);
this.windowsBadge.set_size(windowBadgesize, windowBadgesize);
this.windowsBadge.allocate(windowBadgeBox, flags);
this.windowsBadge.allocate(windowBadgeBox);

// Set notifications badge position
const notifBadgeOffset = 3 * global.ui_scale;
Expand All @@ -462,7 +462,7 @@ class AppGroup {
const notifLabelPosY = Math.floor((notifBadgesize - nLabelNaturalHeight) / 2);
this.notificationsBadgeLabel.set_anchor_point(-notifLabelPosX, -notifLabelPosY);
this.notificationsBadge.set_size(notifBadgesize, notifBadgesize);
this.notificationsBadge.allocate(notifBadgeBox, flags);
this.notificationsBadge.allocate(notifBadgeBox);

// Set label position
if (this.drawLabel) {
Expand Down Expand Up @@ -492,7 +492,7 @@ class AppGroup {
else
this.label.set_style('text-align: right;');

this.label.allocate(childBox, flags);
this.label.allocate(childBox);
}

// Call set_icon_geometry for support of Cinnamon's minimize animation
Expand All @@ -507,7 +507,7 @@ class AppGroup {
});
}

if (this.progressOverlay.visible) this.allocateProgress(childBox, flags);
if (this.progressOverlay.visible) this.allocateProgress(childBox);
}

showLabel(animate = false) {
Expand Down Expand Up @@ -610,7 +610,7 @@ class AppGroup {
return total / count;
}

allocateProgress(childBox = null, flags = 0) {
allocateProgress(childBox = null) {
if (!childBox) childBox = new Clutter.ActorBox();
childBox.y1 = 0;
childBox.y2 = this.actor.height;
Expand All @@ -621,7 +621,7 @@ class AppGroup {
childBox.x1 = 0;
childBox.x2 = Math.max(this.actor.width * (this.progress / 100.0), 1.0);
}
this.progressOverlay.allocate(childBox, flags);
this.progressOverlay.allocate(childBox);
}

onProgressChange(metaWindow) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ class AppMenuButton {
}
}

_allocate(actor, box, flags) {
_allocate(actor, box) {
let allocWidth = box.x2 - box.x1;
let allocHeight = box.y2 - box.y1;

Expand Down Expand Up @@ -750,7 +750,7 @@ class AppMenuButton {
childBox.x1 = box.x1 + Math.floor(Math.max(0, allocWidth - naturalWidth) / 2);
childBox.x2 = Math.min(childBox.x1 + naturalWidth, box.x2);
}
this._iconBox.allocate(childBox, flags);
this._iconBox.allocate(childBox);

// Set notifications badge position
const notifBadgeOffset = 3 * global.ui_scale;
Expand All @@ -766,7 +766,7 @@ class AppMenuButton {
const notifLabelPosY = Math.floor((notifBadgesize - nLabelNaturalHeight) / 2);
this.notificationsBadgeLabel.set_anchor_point(-notifLabelPosX, -notifLabelPosY);
this.notificationsBadge.set_size(notifBadgesize, notifBadgesize);
this.notificationsBadge.allocate(notifBadgeBox, flags);
this.notificationsBadge.allocate(notifBadgeBox);

if (this.drawLabel) {
[minWidth, minHeight, naturalWidth, naturalHeight] = this._label.get_preferred_size();
Expand All @@ -783,7 +783,7 @@ class AppMenuButton {
childBox.x1 = box.x1;
}

this._label.allocate(childBox, flags);
this._label.allocate(childBox);
}

if (!this.progressOverlay.visible) {
Expand All @@ -795,7 +795,7 @@ class AppMenuButton {
childBox.x2 = this.actor.width;
childBox.y2 = this.actor.height;

this.progressOverlay.allocate(childBox, flags);
this.progressOverlay.allocate(childBox);

let clip_width = Math.max((this.actor.width) * (this._progress / 100.0), 1.0);
this.progressOverlay.set_clip(0, 0, clip_width, this.actor.height);
Expand Down
22 changes: 11 additions & 11 deletions js/ui/appSwitcher/classicSwitcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ ClassicSwitcher.prototype = {
alloc.natural_size = global.screen_height;
},

_allocate: function (actor, box, flags) {
_allocate: function (actor, box) {
let childBox = new Clutter.ActorBox();
let monitor = this._activeMonitor;

Expand All @@ -110,7 +110,7 @@ ClassicSwitcher.prototype = {
childBox.x2 = Math.min(monitor.x + monitor.width - rightPadding, childBox.x1 + childNaturalWidth);
childBox.y1 = monitor.y + Math.floor((monitor.height - childNaturalHeight) / 2);
childBox.y2 = childBox.y1 + childNaturalHeight;
this._appList.actor.allocate(childBox, flags);
this._appList.actor.allocate(childBox);

// Allocate the thumbnails
// We try to avoid overflowing the screen so we base the resulting size on
Expand All @@ -133,7 +133,7 @@ ClassicSwitcher.prototype = {
this._thumbnails.addClones(monitor.y + monitor.height - bottomPadding - childBox.y1);
let [childMinHeight, childNaturalHeight] = this._thumbnails.actor.get_preferred_height(-1);
childBox.y2 = childBox.y1 + childNaturalHeight;
this._thumbnails.actor.allocate(childBox, flags);
this._thumbnails.actor.allocate(childBox);
}
},

Expand Down Expand Up @@ -518,7 +518,7 @@ SwitcherList.prototype = {
this._activeMonitor = activeMonitor;
},

_allocateTop: function(actor, box, flags) {
_allocateTop: function(actor, box) {
if (this._list.spacing === -1) {
this._list.spacing = this._list.get_theme_node().get_length('spacing');
}
Expand All @@ -529,20 +529,20 @@ SwitcherList.prototype = {
let childBox = new Clutter.ActorBox();
let scrollable = this._minSize > box.x2 - box.x1;

this._clipBin.allocate(box, flags);
this._clipBin.allocate(box);

childBox.x1 = 0;
childBox.y1 = 0;
childBox.x2 = this._leftGradient.width;
childBox.y2 = this.actor.height;
this._leftGradient.allocate(childBox, flags);
this._leftGradient.allocate(childBox);
this._leftGradient.opacity = (this._scrollableLeft && scrollable) ? 255 : 0;

childBox.x1 = (this.actor.allocation.x2 - this.actor.allocation.x1) - this._rightGradient.width;
childBox.y1 = 0;
childBox.x2 = childBox.x1 + this._rightGradient.width;
childBox.y2 = this.actor.height;
this._rightGradient.allocate(childBox, flags);
this._rightGradient.allocate(childBox);
this._rightGradient.opacity = (this._scrollableRight && scrollable) ? 255 : 0;

let arrowWidth = Math.floor(leftPadding / 3);
Expand All @@ -551,7 +551,7 @@ SwitcherList.prototype = {
childBox.y1 = this.actor.height / 2 - arrowWidth;
childBox.x2 = childBox.x1 + arrowWidth;
childBox.y2 = childBox.y1 + arrowHeight;
this._leftArrow.allocate(childBox, flags);
this._leftArrow.allocate(childBox);
this._leftArrow.opacity = this._leftGradient.opacity;

arrowWidth = Math.floor(rightPadding / 3);
Expand All @@ -560,7 +560,7 @@ SwitcherList.prototype = {
childBox.y1 = this.actor.height / 2 - arrowWidth;
childBox.x2 = childBox.x1 + arrowWidth;
childBox.y2 = childBox.y1 + arrowHeight;
this._rightArrow.allocate(childBox, flags);
this._rightArrow.allocate(childBox);
this._rightArrow.opacity = this._rightGradient.opacity;
},

Expand Down Expand Up @@ -699,7 +699,7 @@ SwitcherList.prototype = {
alloc.natural_size = maxChildNat;
},

_allocate: function (actor, box, flags) {
_allocate: function (actor, box) {
let childHeight = box.y2 - box.y1;

let [maxChildMin, maxChildNat] = this._maxChildWidth();
Expand Down Expand Up @@ -730,7 +730,7 @@ SwitcherList.prototype = {
childBox.y1 = vSpacing;
childBox.x2 = x + childWidth;
childBox.y2 = childBox.y1 + childNat;
children[i].allocate(childBox, flags);
children[i].allocate(childBox);

x += this._list.spacing + childWidth;
} else {
Expand Down
8 changes: 4 additions & 4 deletions js/ui/boxpointer.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,13 @@ var BoxPointer = GObject.registerClass({
return themeNode.adjust_preferred_height(...height);
}

vfunc_allocate(box, flags) {
vfunc_allocate(box) {
if (this._sourceActor && this._sourceActor.mapped) {
this._reposition(box);
this._updateFlip(box);
}

this.set_allocation(box, flags);
this.set_allocation(box);

let themeNode = this.get_theme_node();
let borderWidth = themeNode.get_length('-arrow-border-width');
Expand All @@ -214,7 +214,7 @@ var BoxPointer = GObject.registerClass({
childBox.y1 = 0;
childBox.x2 = availWidth;
childBox.y2 = availHeight;
this._border.allocate(childBox, flags);
this._border.allocate(childBox);

childBox.x1 = borderWidth;
childBox.y1 = borderWidth;
Expand All @@ -234,7 +234,7 @@ var BoxPointer = GObject.registerClass({
childBox.x2 -= rise;
break;
}
this.bin.allocate(childBox, flags);
this.bin.allocate(childBox);
}

_drawBorder(area) {
Expand Down
4 changes: 2 additions & 2 deletions js/ui/dnd.js
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ GenericDragItemContainer.prototype = {
this.animatingOut = false;
},

_allocate: function(actor, box, flags) {
_allocate: function(actor, box) {
if (this.child == null)
return;

Expand All @@ -740,7 +740,7 @@ GenericDragItemContainer.prototype = {
childBox.x2 = childBox.x1 + childWidth;
childBox.y2 = childBox.y1 + childHeight;

this.child.allocate(childBox, flags);
this.child.allocate(childBox);
},

_getPreferredHeight: function(actor, forWidth, alloc) {
Expand Down
12 changes: 6 additions & 6 deletions js/ui/expoThumbnail.js
Original file line number Diff line number Diff line change
Expand Up @@ -1588,7 +1588,7 @@ ExpoThumbnailsBox.prototype = {
themeNode.adjust_preferred_width(totalSpacing, Main.layoutManager.primaryMonitor.width);
},

allocate: function(actor, box, flags) {
allocate: function(actor, box) {
this.box = box;
let rtl = (St.Widget.get_default_direction () == St.TextDirection.RTL);

Expand Down Expand Up @@ -1654,7 +1654,7 @@ ExpoThumbnailsBox.prototype = {
childBox.y1 = box.y1;
childBox.y2 = box.y2 + this.thumbnails[0].title.height;

this.background.allocate(childBox, flags);
this.background.allocate(childBox);

let x;
let y = spacing + Math.floor((availY - nRows * thumbnailHeight) / 2);
Expand Down Expand Up @@ -1688,7 +1688,7 @@ ExpoThumbnailsBox.prototype = {

let scale = this._scale * (1 - thumbnail.slidePosition);
thumbnail.actor.set_scale(scale, scale);
thumbnail.actor.allocate(childBox, flags);
thumbnail.actor.allocate(childBox);

let framethemeNode = thumbnail.frame.get_theme_node();
let borderWidth = framethemeNode.get_border_width(St.Side.BOTTOM);
Expand All @@ -1697,14 +1697,14 @@ ExpoThumbnailsBox.prototype = {
childBox.y1 = y1 - borderWidth;
childBox.y2 = y2 + borderWidth;
thumbnail.frame.set_scale((1 - thumbnail.slidePosition), (1 - thumbnail.slidePosition));
thumbnail.frame.allocate(childBox, flags);
thumbnail.frame.allocate(childBox);

let thumbnailx = Math.round(x + (thumbnailWidth * thumbnail.slidePosition / 2));
childBox.x1 = Math.max(thumbnailx, thumbnailx + Math.round(thumbnailWidth/2) - Math.round(thumbnail.title.width/2));
childBox.x2 = Math.min(thumbnailx + thumbnailWidth, childBox.x1 + thumbnail.title.width);
childBox.y1 = y + thumbnailHeight + thTitleMargin;
childBox.y2 = childBox.y1 + thumbnail.title.height;
thumbnail.title.allocate(childBox, flags);
thumbnail.title.allocate(childBox);

x += thumbnailWidth + spacing;
y += (i + 1) % nColumns > 0 ? 0 : thumbnailHeight + extraHeight + thTitleMargin;
Expand All @@ -1728,7 +1728,7 @@ ExpoThumbnailsBox.prototype = {
childBox.y1 = y;
childBox.y2 = childBox.y1 + buttonHeight;

this.button.allocate(childBox, flags);
this.button.allocate(childBox);

this.emit('allocated');
},
Expand Down
Loading
Loading