Commit b9fba54b authored by Debarshi Ray's avatar Debarshi Ray

apps-menu: Prevent the ApplicationMenuItem from becoming too wide

PopupMenu.PopupBaseMenuItem uses the natural width of its children to
set its own minimum and natural widths. We don't want that because
some of our children can be too wide. So, we override it.

We also set the span and expand parameters of the label to -1 and true
respectively. Otherwise we won't get to see the "...".
parent f187f47c
......@@ -57,7 +57,7 @@ const ApplicationMenuItem = new Lang.Class({
let appLabel = new St.Label({ text: app.get_name() });
this.addActor(appLabel, { span: -1, expand: true }); = appLabel;
......@@ -72,6 +72,10 @@ const ApplicationMenuItem = new Lang.Class({
if (active)
this.parent(active, params);
_getPreferredWidth: function(actor, forHeight, alloc) {
alloc.min_size = alloc.natural_size = -1;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment