Permalink
Browse files

Applications box fills all the available space in the menu, and favor…

…ites box height takes the system box height into account
  • Loading branch information...
1 parent bc3706b commit c167571e01478425fca4c870f4ed5062524c6215 @glebihan glebihan committed Dec 18, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 js/ui/mintMenu.js
View
@@ -156,7 +156,8 @@ FavoritesButton.prototype = {
this.actor = new St.Button({ reactive: true, style_class: 'applications-menu-favorites-button' });
let monitorHeight = Main.layoutManager.primaryMonitor.height;
- let real_size = (0.7*monitorHeight) / nbFavorites;
+ let boxHeight = monitorHeight - (appsMenuButton.systemBox.get_allocation_box().y2-appsMenuButton.systemBox.get_allocation_box().y1);
+ let real_size = (0.7*boxHeight) / nbFavorites;
let icon_size = 0.6*real_size;
if (icon_size>FAV_ICON_SIZE) icon_size = FAV_ICON_SIZE;
this.actor.style = "padding-top: "+(icon_size/3)+"px;padding-bottom: "+(icon_size/3)+"px;padding-left: "+(icon_size/3)+"px;padding-right: "+(icon_size/3)+"px;"
@@ -427,7 +428,8 @@ ApplicationsButton.prototype = {
global.stage.set_key_focus(this.searchEntry);
this._selectedItemIndex = null;
this._activeContainer = null;
- let scrollBoxHeight = this.favoritesBox.get_allocation_box().y2-this.favoritesBox.get_allocation_box().y1
+ let scrollBoxHeight = (this.favoritesBox.get_allocation_box().y2-this.favoritesBox.get_allocation_box().y1)
+ +(this.systemBox.get_allocation_box().y2-this.systemBox.get_allocation_box().y1)
-(this.searchBox.get_allocation_box().y2-this.searchBox.get_allocation_box().y1);
if (scrollBoxHeight<300) scrollBoxHeight = 300;
this.applicationsScrollBox.style = "height: "+scrollBoxHeight+"px;";

0 comments on commit c167571

Please sign in to comment.