[gnome-shell] AppDisplay: fix allocation loop warnings
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] AppDisplay: fix allocation loop warnings
- Date: Fri, 22 Feb 2013 13:58:42 +0000 (UTC)
commit 95602eb85d167c991575b9358e4d69eb23aa68a3
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Wed Feb 20 17:20:46 2013 +0100
AppDisplay: fix allocation loop warnings
Don't use a constraint to position the boxpointer horizontally. Instead,
use the right alignment flags and let the layout managers do their job.
https://bugzilla.gnome.org/show_bug.cgi?id=694284
js/ui/appDisplay.js | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 2b1bd9a..1120071 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -567,10 +567,6 @@ const FolderIcon = new Lang.Class({
this._popup = new AppFolderPopup(this, side);
this._parentView.addFolderPopup(this._popup);
- let constraint = new Clutter.AlignConstraint({ source: this._parentView.actor,
- align_axis: Clutter.AlignAxis.X_AXIS,
- factor: 0.5 });
- this._popup.actor.add_constraint(constraint);
// Position the popup above or below the source icon
if (side == St.Side.BOTTOM) {
@@ -600,7 +596,17 @@ const AppFolderPopup = new Lang.Class({
this._isOpen = false;
this.actor = new St.Widget({ layout_manager: new Clutter.BinLayout(),
- visible: false });
+ visible: false,
+ // We don't want to expand really, but look
+ // at the layout manager of our parent...
+ //
+ // DOUBLE HACK: if you set one, you automatically
+ // get the effect for the other direction too, so
+ // we need to set the y_align
+ x_expand: true,
+ y_expand: true,
+ x_align: Clutter.ActorAlign.CENTER,
+ y_align: Clutter.ActorAlign.START });
this._boxPointer = new BoxPointer.BoxPointer(this._arrowSide,
{ style_class: 'app-folder-popup-bin',
x_fill: true,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]