Remove ClutterAllocationFlags
Those flags were removed from Clutter since they're pretty much unused, so remove them here, too. See https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1245 https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1245
This commit is contained in:
parent
693dd79d28
commit
9b99b67fea
@ -589,8 +589,8 @@ var LoginDialog = GObject.registerClass({
|
||||
return actorBox;
|
||||
}
|
||||
|
||||
vfunc_allocate(dialogBox, flags) {
|
||||
this.set_allocation(dialogBox, flags);
|
||||
vfunc_allocate(dialogBox) {
|
||||
this.set_allocation(dialogBox);
|
||||
|
||||
let themeNode = this.get_theme_node();
|
||||
dialogBox = themeNode.get_content_box(dialogBox);
|
||||
@ -719,19 +719,19 @@ var LoginDialog = GObject.registerClass({
|
||||
|
||||
// Finally hand out the allocations
|
||||
if (bannerAllocation)
|
||||
this._bannerView.allocate(bannerAllocation, flags);
|
||||
this._bannerView.allocate(bannerAllocation);
|
||||
|
||||
if (authPromptAllocation)
|
||||
this._authPrompt.allocate(authPromptAllocation, flags);
|
||||
this._authPrompt.allocate(authPromptAllocation);
|
||||
|
||||
if (userSelectionAllocation)
|
||||
this._userSelectionBox.allocate(userSelectionAllocation, flags);
|
||||
this._userSelectionBox.allocate(userSelectionAllocation);
|
||||
|
||||
if (logoAllocation)
|
||||
this._logoBin.allocate(logoAllocation, flags);
|
||||
this._logoBin.allocate(logoAllocation);
|
||||
|
||||
if (sessionMenuButtonAllocation)
|
||||
this._sessionMenuButton.allocate(sessionMenuButtonAllocation, flags);
|
||||
this._sessionMenuButton.allocate(sessionMenuButtonAllocation);
|
||||
}
|
||||
|
||||
_ensureUserListLoaded() {
|
||||
|
@ -68,8 +68,8 @@ class AppSwitcherPopup extends SwitcherPopup.SwitcherPopup {
|
||||
this._items = this._switcherList.icons;
|
||||
}
|
||||
|
||||
vfunc_allocate(box, flags) {
|
||||
super.vfunc_allocate(box, flags);
|
||||
vfunc_allocate(box) {
|
||||
super.vfunc_allocate(box);
|
||||
|
||||
// Allocate the thumbnails
|
||||
// We try to avoid overflowing the screen so we base the resulting size on
|
||||
@ -102,7 +102,7 @@ class AppSwitcherPopup extends SwitcherPopup.SwitcherPopup {
|
||||
this._thumbnails.addClones(primary.y + primary.height - bottomPadding - childBox.y1);
|
||||
let [, childNaturalHeight] = this._thumbnails.get_preferred_height(-1);
|
||||
childBox.y2 = childBox.y1 + childNaturalHeight;
|
||||
this._thumbnails.allocate(childBox, flags);
|
||||
this._thumbnails.allocate(childBox);
|
||||
}
|
||||
}
|
||||
|
||||
@ -749,9 +749,9 @@ class AppSwitcher extends SwitcherPopup.SwitcherList {
|
||||
return super.vfunc_get_preferred_height(forWidth);
|
||||
}
|
||||
|
||||
vfunc_allocate(box, flags) {
|
||||
vfunc_allocate(box) {
|
||||
// Allocate the main list items
|
||||
super.vfunc_allocate(box, flags);
|
||||
super.vfunc_allocate(box);
|
||||
|
||||
let contentBox = this.get_theme_node().get_content_box(box);
|
||||
|
||||
@ -766,7 +766,7 @@ class AppSwitcher extends SwitcherPopup.SwitcherList {
|
||||
childBox.x2 = childBox.x1 + arrowWidth;
|
||||
childBox.y1 = contentBox.y1 + itemBox.y2 + arrowHeight;
|
||||
childBox.y2 = childBox.y1 + arrowHeight;
|
||||
this._arrows[i].allocate(childBox, flags);
|
||||
this._arrows[i].allocate(childBox);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1056,7 +1056,7 @@ class WindowSwitcher extends SwitcherPopup.SwitcherList {
|
||||
return [minHeight, natHeight];
|
||||
}
|
||||
|
||||
vfunc_allocate(box, flags) {
|
||||
vfunc_allocate(box) {
|
||||
let themeNode = this.get_theme_node();
|
||||
let contentBox = themeNode.get_content_box(box);
|
||||
const labelHeight = this._label.height;
|
||||
@ -1064,20 +1064,20 @@ class WindowSwitcher extends SwitcherPopup.SwitcherList {
|
||||
labelHeight + themeNode.get_padding(St.Side.BOTTOM);
|
||||
|
||||
box.y2 -= totalLabelHeight;
|
||||
super.vfunc_allocate(box, flags);
|
||||
super.vfunc_allocate(box);
|
||||
|
||||
// Hooking up the parent vfunc will call this.set_allocation() with
|
||||
// the height without the label height, so call it again with the
|
||||
// correct size here.
|
||||
box.y2 += totalLabelHeight;
|
||||
this.set_allocation(box, flags);
|
||||
this.set_allocation(box);
|
||||
|
||||
const childBox = new Clutter.ActorBox();
|
||||
childBox.x1 = contentBox.x1;
|
||||
childBox.x2 = contentBox.x2;
|
||||
childBox.y2 = contentBox.y2;
|
||||
childBox.y1 = childBox.y2 - labelHeight;
|
||||
this._label.allocate(childBox, flags);
|
||||
this._label.allocate(childBox);
|
||||
}
|
||||
|
||||
highlight(index, justOutline) {
|
||||
|
@ -1071,13 +1071,13 @@ var ViewStackLayout = GObject.registerClass({
|
||||
Signals: { 'allocated-size-changed': { param_types: [GObject.TYPE_INT,
|
||||
GObject.TYPE_INT] } },
|
||||
}, class ViewStackLayout extends Clutter.BinLayout {
|
||||
vfunc_allocate(actor, box, flags) {
|
||||
vfunc_allocate(actor, box) {
|
||||
let availWidth = box.x2 - box.x1;
|
||||
let availHeight = box.y2 - box.y1;
|
||||
// Prepare children of all views for the upcoming allocation, calculate all
|
||||
// the needed values to adapt available size
|
||||
this.emit('allocated-size-changed', availWidth, availHeight);
|
||||
super.vfunc_allocate(actor, box, flags);
|
||||
super.vfunc_allocate(actor, box);
|
||||
}
|
||||
});
|
||||
|
||||
@ -1947,7 +1947,7 @@ var AppFolderDialog = GObject.registerClass({
|
||||
}
|
||||
}
|
||||
|
||||
vfunc_allocate(box, flags) {
|
||||
vfunc_allocate(box) {
|
||||
let contentBox = this.get_theme_node().get_content_box(box);
|
||||
contentBox = this._viewBox.get_theme_node().get_content_box(contentBox);
|
||||
|
||||
@ -1960,7 +1960,7 @@ var AppFolderDialog = GObject.registerClass({
|
||||
|
||||
this._view._grid.topPadding = 0;
|
||||
|
||||
super.vfunc_allocate(box, flags);
|
||||
super.vfunc_allocate(box);
|
||||
|
||||
// We can only start zooming after receiving an allocation
|
||||
if (this._needsZoomAndFade)
|
||||
|
@ -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');
|
||||
@ -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;
|
||||
@ -234,7 +234,7 @@ var BoxPointer = GObject.registerClass({
|
||||
childBox.x2 -= rise;
|
||||
break;
|
||||
}
|
||||
this.bin.allocate(childBox, flags);
|
||||
this.bin.allocate(childBox);
|
||||
}
|
||||
|
||||
_drawBorder(area) {
|
||||
|
@ -292,11 +292,11 @@ class DashActor extends St.Widget {
|
||||
});
|
||||
}
|
||||
|
||||
vfunc_allocate(box, flags) {
|
||||
vfunc_allocate(box) {
|
||||
let contentBox = this.get_theme_node().get_content_box(box);
|
||||
let availWidth = contentBox.x2 - contentBox.x1;
|
||||
|
||||
this.set_allocation(box, flags);
|
||||
this.set_allocation(box);
|
||||
|
||||
let [appIcons, showAppsButton] = this.get_children();
|
||||
let [, showAppsNatHeight] = showAppsButton.get_preferred_height(availWidth);
|
||||
@ -306,11 +306,11 @@ class DashActor extends St.Widget {
|
||||
childBox.y1 = contentBox.y1;
|
||||
childBox.x2 = contentBox.x2;
|
||||
childBox.y2 = contentBox.y2 - showAppsNatHeight;
|
||||
appIcons.allocate(childBox, flags);
|
||||
appIcons.allocate(childBox);
|
||||
|
||||
childBox.y1 = contentBox.y2 - showAppsNatHeight;
|
||||
childBox.y2 = contentBox.y2;
|
||||
showAppsButton.allocate(childBox, flags);
|
||||
showAppsButton.allocate(childBox);
|
||||
}
|
||||
|
||||
vfunc_get_preferred_height(forWidth) {
|
||||
|
@ -565,8 +565,8 @@ class FreezableBinLayout extends Clutter.BinLayout {
|
||||
return this._savedHeight;
|
||||
}
|
||||
|
||||
vfunc_allocate(container, allocation, flags) {
|
||||
super.vfunc_allocate(container, allocation, flags);
|
||||
vfunc_allocate(container, allocation) {
|
||||
super.vfunc_allocate(container, allocation);
|
||||
|
||||
let [width, height] = allocation.get_size();
|
||||
this._savedWidth = [width, width];
|
||||
|
@ -197,9 +197,9 @@ 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;
|
||||
}
|
||||
|
||||
@ -207,7 +207,7 @@ function animateIconPosition(icon, box, flags, nChangedIcons) {
|
||||
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();
|
||||
|
||||
@ -350,8 +350,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);
|
||||
@ -397,7 +397,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++;
|
||||
}
|
||||
|
||||
@ -855,11 +855,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
|
||||
@ -892,7 +892,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();
|
||||
|
@ -61,7 +61,7 @@ class AspectContainer extends St.Widget {
|
||||
this.queue_relayout();
|
||||
}
|
||||
|
||||
vfunc_allocate(box, flags) {
|
||||
vfunc_allocate(box) {
|
||||
if (box.get_width() > 0 && box.get_height() > 0) {
|
||||
let sizeRatio = box.get_width() / box.get_height();
|
||||
|
||||
@ -79,7 +79,7 @@ class AspectContainer extends St.Widget {
|
||||
}
|
||||
}
|
||||
|
||||
super.vfunc_allocate(box, flags);
|
||||
super.vfunc_allocate(box);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -554,8 +554,8 @@ var Inspector = GObject.registerClass({
|
||||
this._lookingGlass = lookingGlass;
|
||||
}
|
||||
|
||||
vfunc_allocate(box, flags) {
|
||||
this.set_allocation(box, flags);
|
||||
vfunc_allocate(box) {
|
||||
this.set_allocation(box);
|
||||
|
||||
if (!this._eventHandler)
|
||||
return;
|
||||
@ -570,7 +570,7 @@ var Inspector = GObject.registerClass({
|
||||
childBox.x2 = childBox.x1 + natWidth;
|
||||
childBox.y1 = primary.y + Math.floor((primary.height - natHeight) / 2);
|
||||
childBox.y2 = childBox.y1 + natHeight;
|
||||
this._eventHandler.allocate(childBox, flags);
|
||||
this._eventHandler.allocate(childBox);
|
||||
}
|
||||
|
||||
_close() {
|
||||
|
@ -285,12 +285,12 @@ var LabelExpanderLayout = GObject.registerClass({
|
||||
return [min, nat];
|
||||
}
|
||||
|
||||
vfunc_allocate(container, box, flags) {
|
||||
vfunc_allocate(container, box) {
|
||||
for (let i = 0; i < container.get_n_children(); i++) {
|
||||
let child = container.get_child_at_index(i);
|
||||
|
||||
if (child.visible)
|
||||
child.allocate(box, flags);
|
||||
child.allocate(box);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -686,8 +686,8 @@ class SourceActorWithLabel extends SourceActor {
|
||||
});
|
||||
}
|
||||
|
||||
vfunc_allocate(box, flags) {
|
||||
super.vfunc_allocate(box, flags);
|
||||
vfunc_allocate(box) {
|
||||
super.vfunc_allocate(box);
|
||||
|
||||
let childBox = new Clutter.ActorBox();
|
||||
|
||||
@ -707,7 +707,7 @@ class SourceActorWithLabel extends SourceActor {
|
||||
childBox.y1 = box.y2 - naturalHeight;
|
||||
childBox.y2 = box.y2;
|
||||
|
||||
this._counterBin.allocate(childBox, flags);
|
||||
this._counterBin.allocate(childBox);
|
||||
}
|
||||
|
||||
_updateCount() {
|
||||
|
@ -51,7 +51,7 @@ var SlideLayout = GObject.registerClass({
|
||||
return [minWidth, natWidth];
|
||||
}
|
||||
|
||||
vfunc_allocate(container, box, flags) {
|
||||
vfunc_allocate(container, box) {
|
||||
let child = container.get_first_child();
|
||||
|
||||
let availWidth = Math.round(box.x2 - box.x1);
|
||||
@ -72,7 +72,7 @@ var SlideLayout = GObject.registerClass({
|
||||
actorBox.y1 = box.y1;
|
||||
actorBox.y2 = actorBox.y1 + availHeight;
|
||||
|
||||
child.allocate(actorBox, flags);
|
||||
child.allocate(actorBox);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
@ -394,10 +394,10 @@ class DashSpacer extends St.Widget {
|
||||
});
|
||||
|
||||
var ControlsLayout = GObject.registerClass({
|
||||
Signals: { 'allocation-changed': { flags: GObject.SignalFlags.RUN_LAST } },
|
||||
Signals: { 'allocation-changed': {} },
|
||||
}, class ControlsLayout extends Clutter.BinLayout {
|
||||
vfunc_allocate(container, box, flags) {
|
||||
super.vfunc_allocate(container, box, flags);
|
||||
vfunc_allocate(container, box) {
|
||||
super.vfunc_allocate(container, box);
|
||||
this.emit('allocation-changed');
|
||||
}
|
||||
});
|
||||
|
@ -418,8 +418,8 @@ var PadDiagram = GObject.registerClass({
|
||||
child.allocate(childBox, 0);
|
||||
}
|
||||
|
||||
vfunc_allocate(box, flags) {
|
||||
super.vfunc_allocate(box, flags);
|
||||
vfunc_allocate(box) {
|
||||
super.vfunc_allocate(box);
|
||||
this._updateDiagramScale();
|
||||
|
||||
for (let i = 0; i < this._labels.length; i++) {
|
||||
|
@ -842,8 +842,8 @@ class Panel extends St.Widget {
|
||||
return [0, 0];
|
||||
}
|
||||
|
||||
vfunc_allocate(box, flags) {
|
||||
this.set_allocation(box, flags);
|
||||
vfunc_allocate(box) {
|
||||
this.set_allocation(box);
|
||||
|
||||
let allocWidth = box.x2 - box.x1;
|
||||
let allocHeight = box.y2 - box.y1;
|
||||
@ -879,13 +879,13 @@ class Panel extends St.Widget {
|
||||
childBox.x2 = Math.min(Math.floor(sideWidth),
|
||||
leftNaturalWidth);
|
||||
}
|
||||
this._leftBox.allocate(childBox, flags);
|
||||
this._leftBox.allocate(childBox);
|
||||
|
||||
childBox.x1 = Math.ceil(sideWidth);
|
||||
childBox.y1 = 0;
|
||||
childBox.x2 = childBox.x1 + centerWidth;
|
||||
childBox.y2 = allocHeight;
|
||||
this._centerBox.allocate(childBox, flags);
|
||||
this._centerBox.allocate(childBox);
|
||||
|
||||
childBox.y1 = 0;
|
||||
childBox.y2 = allocHeight;
|
||||
@ -899,7 +899,7 @@ class Panel extends St.Widget {
|
||||
0);
|
||||
childBox.x2 = allocWidth;
|
||||
}
|
||||
this._rightBox.allocate(childBox, flags);
|
||||
this._rightBox.allocate(childBox);
|
||||
|
||||
let cornerWidth, cornerHeight;
|
||||
|
||||
@ -909,7 +909,7 @@ class Panel extends St.Widget {
|
||||
childBox.x2 = cornerWidth;
|
||||
childBox.y1 = allocHeight;
|
||||
childBox.y2 = allocHeight + cornerHeight;
|
||||
this._leftCorner.allocate(childBox, flags);
|
||||
this._leftCorner.allocate(childBox);
|
||||
|
||||
[, cornerWidth] = this._rightCorner.get_preferred_width(-1);
|
||||
[, cornerHeight] = this._rightCorner.get_preferred_height(-1);
|
||||
@ -917,7 +917,7 @@ class Panel extends St.Widget {
|
||||
childBox.x2 = allocWidth;
|
||||
childBox.y1 = allocHeight;
|
||||
childBox.y2 = allocHeight + cornerHeight;
|
||||
this._rightCorner.allocate(childBox, flags);
|
||||
this._rightCorner.allocate(childBox);
|
||||
}
|
||||
|
||||
_tryDragWindow(event) {
|
||||
|
@ -59,8 +59,8 @@ class ButtonBox extends St.Widget {
|
||||
return [0, 0];
|
||||
}
|
||||
|
||||
vfunc_allocate(box, flags) {
|
||||
this.set_allocation(box, flags);
|
||||
vfunc_allocate(box) {
|
||||
this.set_allocation(box);
|
||||
|
||||
let child = this.get_first_child();
|
||||
if (!child)
|
||||
@ -83,7 +83,7 @@ class ButtonBox extends St.Widget {
|
||||
childBox.y1 = 0;
|
||||
childBox.y2 = availHeight;
|
||||
|
||||
child.allocate(childBox, flags);
|
||||
child.allocate(childBox);
|
||||
}
|
||||
|
||||
_onDestroy() {
|
||||
|
@ -16,7 +16,7 @@ var MAX_LIST_SEARCH_RESULTS_ROWS = 5;
|
||||
|
||||
var MaxWidthBox = GObject.registerClass(
|
||||
class MaxWidthBox extends St.BoxLayout {
|
||||
vfunc_allocate(box, flags) {
|
||||
vfunc_allocate(box) {
|
||||
let themeNode = this.get_theme_node();
|
||||
let maxWidth = themeNode.get_max_width();
|
||||
let availWidth = box.x2 - box.x1;
|
||||
@ -28,7 +28,7 @@ class MaxWidthBox extends St.BoxLayout {
|
||||
adjustedBox.x2 -= Math.floor(excessWidth / 2);
|
||||
}
|
||||
|
||||
super.vfunc_allocate(adjustedBox, flags);
|
||||
super.vfunc_allocate(adjustedBox);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -805,8 +805,8 @@ class InputSourceIndicatorContainer extends St.Widget {
|
||||
}, [0, 0]);
|
||||
}
|
||||
|
||||
vfunc_allocate(box, flags) {
|
||||
this.set_allocation(box, flags);
|
||||
vfunc_allocate(box) {
|
||||
this.set_allocation(box);
|
||||
|
||||
// translate box to (0, 0)
|
||||
box.x2 -= box.x1;
|
||||
@ -815,7 +815,7 @@ class InputSourceIndicatorContainer extends St.Widget {
|
||||
box.y1 = 0;
|
||||
|
||||
this.get_children().forEach(c => {
|
||||
c.allocate_align_fill(box, 0.5, 0.5, false, false, flags);
|
||||
c.allocate_align_fill(box, 0.5, 0.5, false, false);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -66,8 +66,8 @@ var SwitcherPopup = GObject.registerClass({
|
||||
this._disableHover();
|
||||
}
|
||||
|
||||
vfunc_allocate(box, flags) {
|
||||
this.set_allocation(box, flags);
|
||||
vfunc_allocate(box) {
|
||||
this.set_allocation(box);
|
||||
|
||||
let childBox = new Clutter.ActorBox();
|
||||
let primary = Main.layoutManager.primaryMonitor;
|
||||
@ -84,7 +84,7 @@ var SwitcherPopup = GObject.registerClass({
|
||||
childBox.x2 = Math.min(primary.x + primary.width - rightPadding, childBox.x1 + childNaturalWidth);
|
||||
childBox.y1 = primary.y + Math.floor((primary.height - childNaturalHeight) / 2);
|
||||
childBox.y2 = childBox.y1 + childNaturalHeight;
|
||||
this._switcherList.allocate(childBox, flags);
|
||||
this._switcherList.allocate(childBox);
|
||||
}
|
||||
|
||||
_initialSelection(backward, _binding) {
|
||||
@ -591,8 +591,8 @@ var SwitcherList = GObject.registerClass({
|
||||
return themeNode.adjust_preferred_height(maxChildMin, maxChildNat);
|
||||
}
|
||||
|
||||
vfunc_allocate(box, flags) {
|
||||
this.set_allocation(box, flags);
|
||||
vfunc_allocate(box) {
|
||||
this.set_allocation(box);
|
||||
|
||||
let contentBox = this.get_theme_node().get_content_box(box);
|
||||
let width = contentBox.x2 - contentBox.x1;
|
||||
@ -606,7 +606,7 @@ var SwitcherList = GObject.registerClass({
|
||||
let childBox = new Clutter.ActorBox();
|
||||
let scrollable = minListWidth > width;
|
||||
|
||||
this._scrollView.allocate(contentBox, flags);
|
||||
this._scrollView.allocate(contentBox);
|
||||
|
||||
let arrowWidth = Math.floor(leftPadding / 3);
|
||||
let arrowHeight = arrowWidth * 2;
|
||||
@ -614,7 +614,7 @@ var SwitcherList = GObject.registerClass({
|
||||
childBox.y1 = this.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._scrollableLeft && scrollable ? 255 : 0;
|
||||
|
||||
arrowWidth = Math.floor(rightPadding / 3);
|
||||
@ -623,7 +623,7 @@ var SwitcherList = GObject.registerClass({
|
||||
childBox.y1 = this.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._scrollableRight && scrollable ? 255 : 0;
|
||||
}
|
||||
});
|
||||
|
@ -405,7 +405,7 @@ class UnlockDialogLayout extends Clutter.LayoutManager {
|
||||
return this._stack.get_preferred_height(forWidth);
|
||||
}
|
||||
|
||||
vfunc_allocate(container, box, flags) {
|
||||
vfunc_allocate(container, box) {
|
||||
let [width, height] = box.get_size();
|
||||
|
||||
let tenthOfHeight = height / 10.0;
|
||||
@ -432,7 +432,7 @@ class UnlockDialogLayout extends Clutter.LayoutManager {
|
||||
actorBox.x2 = columnX1 + columnWidth;
|
||||
actorBox.y2 = actorBox.y1 + maxNotificationsHeight;
|
||||
|
||||
this._notifications.allocate(actorBox, flags);
|
||||
this._notifications.allocate(actorBox);
|
||||
|
||||
// Authentication Box
|
||||
let stackY = Math.min(
|
||||
@ -444,7 +444,7 @@ class UnlockDialogLayout extends Clutter.LayoutManager {
|
||||
actorBox.x2 = columnX1 + columnWidth;
|
||||
actorBox.y2 = stackY + stackHeight;
|
||||
|
||||
this._stack.allocate(actorBox, flags);
|
||||
this._stack.allocate(actorBox);
|
||||
|
||||
// Switch User button
|
||||
if (this._switchUserButton.visible) {
|
||||
@ -461,7 +461,7 @@ class UnlockDialogLayout extends Clutter.LayoutManager {
|
||||
actorBox.x2 = actorBox.x1 + natWidth;
|
||||
actorBox.y2 = actorBox.y1 + natHeight;
|
||||
|
||||
this._switchUserButton.allocate(actorBox, flags);
|
||||
this._switchUserButton.allocate(actorBox);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -144,8 +144,8 @@ class UserWidgetLabel extends St.Widget {
|
||||
}
|
||||
}
|
||||
|
||||
vfunc_allocate(box, flags) {
|
||||
this.set_allocation(box, flags);
|
||||
vfunc_allocate(box) {
|
||||
this.set_allocation(box);
|
||||
|
||||
let availWidth = box.x2 - box.x1;
|
||||
let availHeight = box.y2 - box.y1;
|
||||
@ -164,7 +164,7 @@ class UserWidgetLabel extends St.Widget {
|
||||
childBox.x2 = availWidth;
|
||||
childBox.y2 = availHeight;
|
||||
|
||||
this._currentLabel.allocate(childBox, flags);
|
||||
this._currentLabel.allocate(childBox);
|
||||
}
|
||||
|
||||
vfunc_paint(paintContext) {
|
||||
|
@ -79,7 +79,7 @@ class WindowCloneLayout extends Clutter.LayoutManager {
|
||||
return [this._boundingBox.width, this._boundingBox.width];
|
||||
}
|
||||
|
||||
vfunc_allocate(container, box, flags) {
|
||||
vfunc_allocate(container, _box) {
|
||||
container.get_children().forEach(child => {
|
||||
let realWindow;
|
||||
if (child == container._windowClone)
|
||||
@ -87,8 +87,7 @@ class WindowCloneLayout extends Clutter.LayoutManager {
|
||||
else
|
||||
realWindow = child.source;
|
||||
|
||||
child.allocate(this._makeBoxForWindow(realWindow.meta_window),
|
||||
flags);
|
||||
child.allocate(this._makeBoxForWindow(realWindow.meta_window));
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -86,8 +86,8 @@ class WorkspaceSwitcherPopupList extends St.Widget {
|
||||
return this._getSizeForOppositeOrientation();
|
||||
}
|
||||
|
||||
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);
|
||||
@ -111,7 +111,7 @@ class WorkspaceSwitcherPopupList extends St.Widget {
|
||||
} else {
|
||||
y += this._childHeight + this._itemSpacing;
|
||||
}
|
||||
child.allocate(childBox, flags);
|
||||
child.allocate(childBox);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -1204,8 +1204,8 @@ var ThumbnailsBox = GObject.registerClass({
|
||||
this.queue_relayout();
|
||||
}
|
||||
|
||||
vfunc_allocate(box, flags) {
|
||||
this.set_allocation(box, flags);
|
||||
vfunc_allocate(box) {
|
||||
this.set_allocation(box);
|
||||
|
||||
let rtl = Clutter.get_default_text_direction() == Clutter.TextDirection.RTL;
|
||||
|
||||
@ -1299,7 +1299,7 @@ var ThumbnailsBox = GObject.registerClass({
|
||||
childBox.x2 = x2;
|
||||
childBox.y1 = Math.round(y);
|
||||
childBox.y2 = Math.round(y + placeholderHeight);
|
||||
this._dropPlaceholder.allocate(childBox, flags);
|
||||
this._dropPlaceholder.allocate(childBox);
|
||||
Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
|
||||
this._dropPlaceholder.show();
|
||||
});
|
||||
@ -1331,7 +1331,7 @@ var ThumbnailsBox = GObject.registerClass({
|
||||
childBox.y2 = y1 + portholeHeight;
|
||||
|
||||
thumbnail.set_scale(roundedHScale, roundedVScale);
|
||||
thumbnail.allocate(childBox, flags);
|
||||
thumbnail.allocate(childBox);
|
||||
|
||||
// We round the collapsing portion so that we don't get thumbnails resizing
|
||||
// during an animation due to differences in rounded, but leave the uncollapsed
|
||||
@ -1355,6 +1355,6 @@ var ThumbnailsBox = GObject.registerClass({
|
||||
childBox.x2 += indicatorRightFullBorder;
|
||||
childBox.y1 = indicatorY1 - indicatorTopFullBorder;
|
||||
childBox.y2 = indicatorY2 + indicatorBottomFullBorder;
|
||||
this._indicator.allocate(childBox, flags);
|
||||
this._indicator.allocate(childBox);
|
||||
}
|
||||
});
|
||||
|
@ -268,15 +268,14 @@ shell_gtk_embed_get_preferred_height (ClutterActor *actor,
|
||||
|
||||
static void
|
||||
shell_gtk_embed_allocate (ClutterActor *actor,
|
||||
const ClutterActorBox *box,
|
||||
ClutterAllocationFlags flags)
|
||||
const ClutterActorBox *box)
|
||||
{
|
||||
ShellGtkEmbed *embed = SHELL_GTK_EMBED (actor);
|
||||
ShellGtkEmbedPrivate *priv = shell_gtk_embed_get_instance_private (embed);
|
||||
float wx, wy;
|
||||
|
||||
CLUTTER_ACTOR_CLASS (shell_gtk_embed_parent_class)->
|
||||
allocate (actor, box, flags);
|
||||
allocate (actor, box);
|
||||
|
||||
/* Find the actor's new coordinates in terms of the stage (which is
|
||||
* priv->window's parent window.
|
||||
|
@ -25,14 +25,13 @@ G_DEFINE_TYPE (ShellStack, shell_stack, ST_TYPE_WIDGET);
|
||||
|
||||
static void
|
||||
shell_stack_allocate (ClutterActor *self,
|
||||
const ClutterActorBox *box,
|
||||
ClutterAllocationFlags flags)
|
||||
const ClutterActorBox *box)
|
||||
{
|
||||
StThemeNode *theme_node = st_widget_get_theme_node (ST_WIDGET (self));
|
||||
ClutterActorBox content_box;
|
||||
ClutterActor *child;
|
||||
|
||||
clutter_actor_set_allocation (self, box, flags);
|
||||
clutter_actor_set_allocation (self, box);
|
||||
|
||||
st_theme_node_get_content_box (theme_node, box, &content_box);
|
||||
|
||||
@ -41,7 +40,7 @@ shell_stack_allocate (ClutterActor *self,
|
||||
child = clutter_actor_get_next_sibling (child))
|
||||
{
|
||||
ClutterActorBox child_box = content_box;
|
||||
clutter_actor_allocate (child, &child_box, flags);
|
||||
clutter_actor_allocate (child, &child_box);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -115,12 +115,11 @@ get_align_factor (ClutterActorAlign align)
|
||||
|
||||
static void
|
||||
st_bin_allocate (ClutterActor *self,
|
||||
const ClutterActorBox *box,
|
||||
ClutterAllocationFlags flags)
|
||||
const ClutterActorBox *box)
|
||||
{
|
||||
StBinPrivate *priv = st_bin_get_instance_private (ST_BIN (self));
|
||||
|
||||
clutter_actor_set_allocation (self, box, flags);
|
||||
clutter_actor_set_allocation (self, box);
|
||||
|
||||
if (priv->child && clutter_actor_is_visible (priv->child))
|
||||
{
|
||||
@ -134,8 +133,7 @@ st_bin_allocate (ClutterActor *self,
|
||||
get_align_factor (x_align),
|
||||
get_align_factor (y_align),
|
||||
x_align == CLUTTER_ACTOR_ALIGN_FILL,
|
||||
y_align == CLUTTER_ACTOR_ALIGN_FILL,
|
||||
flags);
|
||||
y_align == CLUTTER_ACTOR_ALIGN_FILL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -77,8 +77,7 @@ draw_content (ClutterCanvas *canvas,
|
||||
|
||||
static void
|
||||
st_drawing_area_allocate (ClutterActor *self,
|
||||
const ClutterActorBox *box,
|
||||
ClutterAllocationFlags flags)
|
||||
const ClutterActorBox *box)
|
||||
{
|
||||
StThemeNode *theme_node = st_widget_get_theme_node (ST_WIDGET (self));
|
||||
ClutterContent *content = clutter_actor_get_content (self);
|
||||
@ -89,11 +88,11 @@ st_drawing_area_allocate (ClutterActor *self,
|
||||
if (!st_widget_get_resource_scale (ST_WIDGET (self), &resource_scale))
|
||||
{
|
||||
ClutterActorBox empty = CLUTTER_ACTOR_BOX_INIT_ZERO;
|
||||
clutter_actor_set_allocation (self, &empty, 0);
|
||||
clutter_actor_set_allocation (self, &empty);
|
||||
return;
|
||||
}
|
||||
|
||||
clutter_actor_set_allocation (self, box, flags);
|
||||
clutter_actor_set_allocation (self, box);
|
||||
st_theme_node_get_content_box (theme_node, box, &content_box);
|
||||
|
||||
width = (int)(0.5 + content_box.x2 - content_box.x1);
|
||||
|
@ -416,8 +416,7 @@ st_entry_get_preferred_height (ClutterActor *actor,
|
||||
|
||||
static void
|
||||
st_entry_allocate (ClutterActor *actor,
|
||||
const ClutterActorBox *box,
|
||||
ClutterAllocationFlags flags)
|
||||
const ClutterActorBox *box)
|
||||
{
|
||||
StEntryPrivate *priv = ST_ENTRY_PRIV (actor);
|
||||
StThemeNode *theme_node = st_widget_get_theme_node (ST_WIDGET (actor));
|
||||
@ -441,7 +440,7 @@ st_entry_allocate (ClutterActor *actor,
|
||||
right_icon = priv->secondary_icon;
|
||||
}
|
||||
|
||||
clutter_actor_set_allocation (actor, box, flags);
|
||||
clutter_actor_set_allocation (actor, box);
|
||||
|
||||
st_theme_node_get_content_box (theme_node, box, &content_box);
|
||||
|
||||
@ -461,7 +460,7 @@ st_entry_allocate (ClutterActor *actor,
|
||||
icon_box.y1 = (int) (content_box.y1 + avail_h / 2 - icon_h / 2);
|
||||
icon_box.y2 = icon_box.y1 + icon_h;
|
||||
|
||||
clutter_actor_allocate (left_icon, &icon_box, flags);
|
||||
clutter_actor_allocate (left_icon, &icon_box);
|
||||
|
||||
/* reduce the size for the entry */
|
||||
child_box.x1 = MIN (child_box.x2, child_box.x1 + icon_w + priv->spacing);
|
||||
@ -478,7 +477,7 @@ st_entry_allocate (ClutterActor *actor,
|
||||
icon_box.y1 = (int) (content_box.y1 + avail_h / 2 - icon_h / 2);
|
||||
icon_box.y2 = icon_box.y1 + icon_h;
|
||||
|
||||
clutter_actor_allocate (right_icon, &icon_box, flags);
|
||||
clutter_actor_allocate (right_icon, &icon_box);
|
||||
|
||||
/* reduce the size for the entry */
|
||||
child_box.x2 = MAX (child_box.x1, child_box.x2 - icon_w - priv->spacing);
|
||||
@ -502,7 +501,7 @@ st_entry_allocate (ClutterActor *actor,
|
||||
hint_box.y1 = ceil (content_box.y1 + avail_h / 2 - hint_h / 2);
|
||||
hint_box.y2 = hint_box.y1 + hint_h;
|
||||
|
||||
clutter_actor_allocate (priv->hint_actor, &hint_box, flags);
|
||||
clutter_actor_allocate (priv->hint_actor, &hint_box);
|
||||
}
|
||||
|
||||
clutter_actor_get_preferred_height (priv->entry, child_box.x2 - child_box.x1,
|
||||
@ -513,7 +512,7 @@ st_entry_allocate (ClutterActor *actor,
|
||||
child_box.y1 = (int) (content_box.y1 + avail_h / 2 - entry_h / 2);
|
||||
child_box.y2 = child_box.y1 + entry_h;
|
||||
|
||||
clutter_actor_allocate (priv->entry, &child_box, flags);
|
||||
clutter_actor_allocate (priv->entry, &child_box);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -165,18 +165,17 @@ st_label_get_preferred_height (ClutterActor *actor,
|
||||
|
||||
static void
|
||||
st_label_allocate (ClutterActor *actor,
|
||||
const ClutterActorBox *box,
|
||||
ClutterAllocationFlags flags)
|
||||
const ClutterActorBox *box)
|
||||
{
|
||||
StLabelPrivate *priv = ST_LABEL (actor)->priv;
|
||||
StThemeNode *theme_node = st_widget_get_theme_node (ST_WIDGET (actor));
|
||||
ClutterActorBox content_box;
|
||||
|
||||
clutter_actor_set_allocation (actor, box, flags);
|
||||
clutter_actor_set_allocation (actor, box);
|
||||
|
||||
st_theme_node_get_content_box (theme_node, box, &content_box);
|
||||
|
||||
clutter_actor_allocate (priv->label, &content_box, flags);
|
||||
clutter_actor_allocate (priv->label, &content_box);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -192,8 +192,7 @@ st_scroll_bar_unmap (ClutterActor *actor)
|
||||
|
||||
static void
|
||||
scroll_bar_allocate_children (StScrollBar *bar,
|
||||
const ClutterActorBox *box,
|
||||
ClutterAllocationFlags flags)
|
||||
const ClutterActorBox *box)
|
||||
{
|
||||
StScrollBarPrivate *priv = st_scroll_bar_get_instance_private (bar);
|
||||
StThemeNode *theme_node = st_widget_get_theme_node (ST_WIDGET (bar));
|
||||
@ -207,7 +206,7 @@ scroll_bar_allocate_children (StScrollBar *bar,
|
||||
trough_box.y1 = content_box.y1;
|
||||
trough_box.x2 = content_box.x2;
|
||||
trough_box.y2 = content_box.y2;
|
||||
clutter_actor_allocate (priv->trough, &trough_box, flags);
|
||||
clutter_actor_allocate (priv->trough, &trough_box);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -215,7 +214,7 @@ scroll_bar_allocate_children (StScrollBar *bar,
|
||||
trough_box.y1 = content_box.y1;
|
||||
trough_box.x2 = content_box.x2;
|
||||
trough_box.y2 = content_box.y2;
|
||||
clutter_actor_allocate (priv->trough, &trough_box, flags);
|
||||
clutter_actor_allocate (priv->trough, &trough_box);
|
||||
}
|
||||
|
||||
|
||||
@ -274,9 +273,7 @@ scroll_bar_allocate_children (StScrollBar *bar,
|
||||
handle_box.y2 = content_box.y2;
|
||||
}
|
||||
|
||||
clutter_actor_allocate (priv->handle,
|
||||
&handle_box,
|
||||
flags);
|
||||
clutter_actor_allocate (priv->handle, &handle_box);
|
||||
}
|
||||
}
|
||||
|
||||
@ -362,14 +359,13 @@ st_scroll_bar_get_preferred_height (ClutterActor *self,
|
||||
|
||||
static void
|
||||
st_scroll_bar_allocate (ClutterActor *actor,
|
||||
const ClutterActorBox *box,
|
||||
ClutterAllocationFlags flags)
|
||||
const ClutterActorBox *box)
|
||||
{
|
||||
StScrollBar *bar = ST_SCROLL_BAR (actor);
|
||||
|
||||
clutter_actor_set_allocation (actor, box, flags);
|
||||
clutter_actor_set_allocation (actor, box);
|
||||
|
||||
scroll_bar_allocate_children (bar, box, flags);
|
||||
scroll_bar_allocate_children (bar, box);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -392,7 +388,7 @@ scroll_bar_update_positions (StScrollBar *bar)
|
||||
return;
|
||||
|
||||
clutter_actor_get_allocation_box (CLUTTER_ACTOR (bar), &box);
|
||||
scroll_bar_allocate_children (bar, &box, CLUTTER_ALLOCATION_NONE);
|
||||
scroll_bar_allocate_children (bar, &box);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -533,8 +533,7 @@ st_scroll_view_get_preferred_height (ClutterActor *actor,
|
||||
|
||||
static void
|
||||
st_scroll_view_allocate (ClutterActor *actor,
|
||||
const ClutterActorBox *box,
|
||||
ClutterAllocationFlags flags)
|
||||
const ClutterActorBox *box)
|
||||
{
|
||||
ClutterActorBox content_box, child_box;
|
||||
gfloat avail_width, avail_height, sb_width, sb_height;
|
||||
@ -543,7 +542,7 @@ st_scroll_view_allocate (ClutterActor *actor,
|
||||
StScrollViewPrivate *priv = ST_SCROLL_VIEW (actor)->priv;
|
||||
StThemeNode *theme_node = st_widget_get_theme_node (ST_WIDGET (actor));
|
||||
|
||||
clutter_actor_set_allocation (actor, box, flags);
|
||||
clutter_actor_set_allocation (actor, box);
|
||||
|
||||
st_theme_node_get_content_box (theme_node, box, &content_box);
|
||||
|
||||
@ -641,7 +640,7 @@ st_scroll_view_allocate (ClutterActor *actor,
|
||||
child_box.y1 = content_box.y1;
|
||||
child_box.y2 = content_box.y2 - (hscrollbar_visible ? sb_height : 0);
|
||||
|
||||
clutter_actor_allocate (priv->vscroll, &child_box, flags);
|
||||
clutter_actor_allocate (priv->vscroll, &child_box);
|
||||
|
||||
/* Horizontal scrollbar */
|
||||
if (clutter_actor_get_text_direction (actor) == CLUTTER_TEXT_DIRECTION_RTL)
|
||||
@ -657,7 +656,7 @@ st_scroll_view_allocate (ClutterActor *actor,
|
||||
child_box.y1 = content_box.y2 - sb_height;
|
||||
child_box.y2 = content_box.y2;
|
||||
|
||||
clutter_actor_allocate (priv->hscroll, &child_box, flags);
|
||||
clutter_actor_allocate (priv->hscroll, &child_box);
|
||||
|
||||
/* In case the scrollbar policy is NEVER or EXTERNAL or scrollbars
|
||||
* should be overlayed, we don't trim the content box allocation by
|
||||
@ -689,7 +688,7 @@ st_scroll_view_allocate (ClutterActor *actor,
|
||||
child_box.y2 = content_box.y2 - sb_height;
|
||||
|
||||
if (priv->child)
|
||||
clutter_actor_allocate (priv->child, &child_box, flags);
|
||||
clutter_actor_allocate (priv->child, &child_box);
|
||||
|
||||
if (priv->hscrollbar_visible != hscrollbar_visible)
|
||||
{
|
||||
|
@ -231,8 +231,7 @@ st_viewport_dispose (GObject *object)
|
||||
|
||||
static void
|
||||
st_viewport_allocate (ClutterActor *actor,
|
||||
const ClutterActorBox *box,
|
||||
ClutterAllocationFlags flags)
|
||||
const ClutterActorBox *box)
|
||||
{
|
||||
StViewport *viewport = ST_VIEWPORT (actor);
|
||||
StViewportPrivate *priv =
|
||||
@ -259,14 +258,14 @@ st_viewport_allocate (ClutterActor *actor,
|
||||
* may not match the minimum sizes reported by the layout manager. When that
|
||||
* happens, the content box needs to be adjusted to match the reported minimum
|
||||
* sizes before being passed to clutter_layout_manager_allocate() */
|
||||
clutter_actor_set_allocation (actor, box, flags);
|
||||
clutter_actor_set_allocation (actor, box);
|
||||
|
||||
content_box = viewport_box;
|
||||
content_box.x2 += MAX (0, min_width - avail_width);
|
||||
content_box.y2 += MAX (0, min_height - avail_height);
|
||||
|
||||
clutter_layout_manager_allocate (layout, CLUTTER_CONTAINER (actor),
|
||||
&content_box, flags);
|
||||
&content_box);
|
||||
|
||||
/* update adjustments for scrolling */
|
||||
if (priv->vadjustment)
|
||||
|
@ -371,8 +371,7 @@ st_widget_get_preferred_height (ClutterActor *self,
|
||||
|
||||
static void
|
||||
st_widget_allocate (ClutterActor *actor,
|
||||
const ClutterActorBox *box,
|
||||
ClutterAllocationFlags flags)
|
||||
const ClutterActorBox *box)
|
||||
{
|
||||
StThemeNode *theme_node = st_widget_get_theme_node (ST_WIDGET (actor));
|
||||
ClutterActorBox content_box;
|
||||
@ -383,7 +382,7 @@ st_widget_allocate (ClutterActor *actor,
|
||||
* manager, meaning that we can't modify it for children only.
|
||||
*/
|
||||
|
||||
clutter_actor_set_allocation (actor, box, flags);
|
||||
clutter_actor_set_allocation (actor, box);
|
||||
|
||||
st_theme_node_get_content_box (theme_node, box, &content_box);
|
||||
|
||||
@ -391,8 +390,7 @@ st_widget_allocate (ClutterActor *actor,
|
||||
* currently installed layout manager */
|
||||
clutter_layout_manager_allocate (clutter_actor_get_layout_manager (actor),
|
||||
CLUTTER_CONTAINER (actor),
|
||||
&content_box,
|
||||
flags);
|
||||
&content_box);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -98,13 +98,12 @@ class FlowedBoxes extends St.Widget {
|
||||
return [height, height];
|
||||
}
|
||||
|
||||
vfunc_allocate(box, flags) {
|
||||
this.set_allocation(box, flags);
|
||||
vfunc_allocate(box) {
|
||||
this.set_allocation(box);
|
||||
|
||||
this._layoutChildren(box.x2 - box.x1,
|
||||
function(child, x1, y1, x2, y2) {
|
||||
child.allocate(new Clutter.ActorBox({ x1: x1, y1: y1, x2: x2, y2: y2 }),
|
||||
flags);
|
||||
child.allocate(new Clutter.ActorBox({ x1: x1, y1: y1, x2: x2, y2: y2 }));
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -185,8 +184,8 @@ class SizingIllustrator extends St.Widget {
|
||||
return [0, 400];
|
||||
}
|
||||
|
||||
vfunc_allocate(box, flags) {
|
||||
this.set_allocation(box, flags);
|
||||
vfunc_allocate(box) {
|
||||
this.set_allocation(box);
|
||||
|
||||
box = this.get_theme_node().get_content_box(box);
|
||||
|
||||
@ -194,8 +193,7 @@ class SizingIllustrator extends St.Widget {
|
||||
let allocHeight = box.y2 - box.y1;
|
||||
|
||||
function alloc(child, x1, y1, x2, y2) {
|
||||
child.allocate(new Clutter.ActorBox({ x1: x1, y1: y1, x2: x2, y2: y2 }),
|
||||
flags);
|
||||
child.allocate(new Clutter.ActorBox({ x1: x1, y1: y1, x2: x2, y2: y2 }));
|
||||
}
|
||||
|
||||
alloc(this.child, 0, 0, this.width, this.height);
|
||||
|
Loading…
Reference in New Issue
Block a user