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
This commit is contained in:
Florian Müllner 2011-07-28 16:59:10 +02:00
parent d0d82cdf7e
commit 709193d680

View File

@ -717,7 +717,8 @@ PopupSwitchMenuItem.prototype = {
this.addActor(this.label); this.addActor(this.label);
this._statusBin = new St.Bin({ x_align: St.Align.END }); 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: '', this._statusLabel = new St.Label({ text: '',
style_class: 'popup-inactive-menu-item' style_class: 'popup-inactive-menu-item'