[gnome-shell] popup-menu: Expand switch menu items
- From: Florian MÃllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] popup-menu: Expand switch menu items
- Date: Mon, 29 Aug 2011 20:12:09 +0000 (UTC)
commit 709193d68004fce3fe57d35694818d5a6c857d88
Author: Florian MÃllner <fmuellner gnome org>
Date: Thu Jul 28 16:59:10 2011 +0200
popup-menu: Expand switch menu items
Given that our menus contain at most two columns, all switch widgets
in menus end up in the last columns, and thus aligned with the right
menu edge.
However, the updated user status menu will contain a section which
ignores the menu's column layout, so the switch might end up in
the middle of the menu if the overall width is determined by said
section.
At least for now, we always want the switch to align with the end,
so just expand switch menu items rather than adding an option.
https://bugzilla.gnome.org/show_bug.cgi?id=652837
js/ui/popupMenu.js | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js
index 07264f3..c272de7 100644
--- a/js/ui/popupMenu.js
+++ b/js/ui/popupMenu.js
@@ -717,7 +717,8 @@ PopupSwitchMenuItem.prototype = {
this.addActor(this.label);
this._statusBin = new St.Bin({ x_align: St.Align.END });
- this.addActor(this._statusBin, { align: St.Align.END });
+ this.addActor(this._statusBin,
+ { expand: true, span: -1, align: St.Align.END });
this._statusLabel = new St.Label({ text: '',
style_class: 'popup-inactive-menu-item'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]