[gnome-shell] messageTray: use alignment rather than gravity to position the summary
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] messageTray: use alignment rather than gravity to position the summary
- Date: Mon, 10 Jan 2011 20:24:11 +0000 (UTC)
commit 4c4a703e6394fbf503e3291b415228318dc4b30d
Author: Dan Winship <danw gnome org>
Date: Fri Jan 7 11:59:20 2011 -0500
messageTray: use alignment rather than gravity to position the summary
Actors in clutter are supposed to be re-allocated with
Clutter.AllocationFlags.ABSOLUTE_ORIGIN_CHANGED if they move relative
to the screen, even if they don't move relative to their parent.
Currently this does not work correctly for actors inside containers
with non-northwest gravity. This is probably a fixable bug, but
gravity has messed up other things in the past too, so let's just not
use it.
This change ensures that summary trayicons are re-allocated when the
summary animates, and is part of the fix for
https://bugzilla.gnome.org/show_bug.cgi?id=635695
js/ui/messageTray.js | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 3593274..04a968b 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -916,7 +916,7 @@ MessageTray.prototype = {
this._notification = null;
this._notificationClickedId = 0;
- this._summaryBin = new St.Bin({ anchor_gravity: Clutter.Gravity.NORTH_EAST });
+ this._summaryBin = new St.Bin({ x_align: St.Align.END });
this.actor.add_actor(this._summaryBin);
this._summary = new St.BoxLayout({ name: 'summary-mode',
reactive: true,
@@ -1008,9 +1008,8 @@ MessageTray.prototype = {
this.actor.width = primary.width;
this._notificationBin.x = 0;
this._notificationBin.width = primary.width;
-
- // These work because of their anchor_gravity
- this._summaryBin.x = primary.width;
+ this._summaryBin.x = 0;
+ this._summaryBin.width = primary.width;
},
contains: function(source) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]