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 @@ var Calendar = 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 @@ var Calendar = 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 @@ -403,7 +403,7 @@ var AppGroup = class AppGroup {
alloc.min_size = alloc.natural_size;
}

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 @@ -429,7 +429,7 @@ var AppGroup = 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 @@ -445,7 +445,7 @@ var AppGroup = 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 @@ -461,7 +461,7 @@ var AppGroup = 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 @@ -491,7 +491,7 @@ var AppGroup = 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 @@ -506,7 +506,7 @@ var AppGroup = class AppGroup {
});
}

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

showLabel(animate = false) {
Expand Down Expand Up @@ -609,7 +609,7 @@ var AppGroup = 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 @@ -620,7 +620,7 @@ var AppGroup = 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 @@ -718,7 +718,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 @@ -751,7 +751,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 @@ -767,7 +767,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 @@ -784,7 +784,7 @@ class AppMenuButton {
childBox.x1 = box.x1;
}

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

if (!this.progressOverlay.visible) {
Expand All @@ -796,7 +796,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 @@ -728,7 +728,7 @@ SwitcherList.prototype = {
childBox.y1 = 0;
childBox.x2 = x + childWidth;
childBox.y2 = childHeight;
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
14 changes: 7 additions & 7 deletions js/ui/expoThumbnail.js
Original file line number Diff line number Diff line change
Expand Up @@ -1741,8 +1741,8 @@ var ExpoThumbnailsBox = GObject.registerClass({
return themeNode.adjust_preferred_width(totalSpacing, Main.layoutManager.primaryMonitor.width);
}

vfunc_allocate(box, flags) {
this.set_allocation(box, flags);
vfunc_allocate(box) {
this.set_allocation(box);
this._allocBox = box;
let rtl = (St.Widget.get_default_direction () == St.TextDirection.RTL);

Expand Down Expand Up @@ -1809,7 +1809,7 @@ var ExpoThumbnailsBox = GObject.registerClass({
childBox.y1 = box.y1;
childBox.y2 = box.y2 + this.thumbnails[0].title.height;

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

// During a workspace drag, build a virtual display order:
// remove the source thumbnail and leave a gap at the drop position.
Expand Down Expand Up @@ -1877,7 +1877,7 @@ var ExpoThumbnailsBox = GObject.registerClass({
childBox.y1 = y1;
childBox.y2 = y1 + portholeHeight;
thumbnail.set_scale(scale, scale);
thumbnail.allocate(childBox, flags);
thumbnail.allocate(childBox);

let framethemeNode = thumbnail.frame.get_theme_node();
let borderWidth = framethemeNode.get_border_width(St.Side.BOTTOM);
Expand All @@ -1886,14 +1886,14 @@ var ExpoThumbnailsBox = GObject.registerClass({
childBox.y1 = y1 - borderWidth;
childBox.y2 = y2 + borderWidth;
thumbnail.frame.set_scale((1 - thumbnail.slide_position), (1 - thumbnail.slide_position));
thumbnail.frame.allocate(childBox, flags);
thumbnail.frame.allocate(childBox);

let thumbnailx = Math.round(x + (thumbnailWidth * thumbnail.slide_position / 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);

if (animate) {
for (let actor of [thumbnail, thumbnail.frame, thumbnail.title]) {
Expand Down Expand Up @@ -1923,7 +1923,7 @@ var ExpoThumbnailsBox = GObject.registerClass({
childBox.y1 = y;
childBox.y2 = childBox.y1 + buttonHeight;

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

this.emit('allocated');
}
Expand Down
18 changes: 9 additions & 9 deletions js/ui/iconGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,17 +194,17 @@ function zoomOutActorAtPos(actor, x, y) {
});
}

function animateIconPosition(icon, box, flags, nChangedIcons) {
function animateIconPosition(icon, box, nChangedIcons) {
if (!icon.has_allocation() || icon.allocation.equal(box) || icon.opacity === 0) {
icon.allocate(box, flags);
icon.allocate(box);
return false;
}

icon.save_easing_state();
icon.set_easing_mode(Clutter.AnimationMode.EASE_OUT_QUAD);
icon.set_easing_delay(nChangedIcons * ICON_POSITION_DELAY);

icon.allocate(box, flags);
icon.allocate(box);

icon.restore_easing_state();

Expand Down Expand Up @@ -348,8 +348,8 @@ var IconGrid = GObject.registerClass({
return themeNode.adjust_preferred_height(height, height);
}

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

let themeNode = this.get_theme_node();
box = themeNode.get_content_box(box);
Expand Down Expand Up @@ -395,7 +395,7 @@ var IconGrid = GObject.registerClass({
if (!animating)
children[i].opacity = 255;

if (animateIconPosition(children[i], childBox, flags, nChangedIcons))
if (animateIconPosition(children[i], childBox, nChangedIcons))
nChangedIcons++;
}

Expand Down Expand Up @@ -878,11 +878,11 @@ class PaginatedIconGrid extends IconGrid {
return [height, height];
}

vfunc_allocate(box, flags) {
vfunc_allocate(box) {
if (this._childrenPerPage == 0)
log('computePages() must be called before allocate(); pagination will not work.');

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

if (this._fillParent) {
// Reset the passed in box to fill the parent
Expand Down Expand Up @@ -915,7 +915,7 @@ class PaginatedIconGrid extends IconGrid {
for (let i = 0; i < children.length; i++) {
let childBox = this._calculateChildBox(children[i], x, y, box);

if (animateIconPosition(children[i], childBox, flags, nChangedIcons))
if (animateIconPosition(children[i], childBox, nChangedIcons))
nChangedIcons++;

children[i].show();
Expand Down
2 changes: 1 addition & 1 deletion js/ui/keyboardManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ var SubscriptableFlagIcon = GObject.registerClass({

this.add_child(this._drawingArea);

this.connect('allocation-changed', () => {
this.connect('notify::allocation', () => {
if (this._image == null) {
this._load_file();
}
Expand Down
Loading
Loading