appsMenu: Consider scale-factor in height computation
Actor heights are in physical pixels, while CSS measures are in logical pixels, so we need to adjust accordingly to prevent the scale factor from being applied twice. https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/102
This commit is contained in:
@@ -685,7 +685,10 @@ class ApplicationsButton extends PanelMenu.Button {
|
||||
//Load applications
|
||||
this._displayButtons(this._listApplications(null));
|
||||
|
||||
let height = this.categoriesBox.height + MENU_HEIGHT_OFFSET + 'px';
|
||||
let themeContext = St.ThemeContext.get_for_stage(global.stage);
|
||||
let scaleFactor = themeContext.scale_factor;
|
||||
let categoriesHeight = this.categoriesBox.height / scaleFactor;
|
||||
let height = Math.round(categoriesHeight) + MENU_HEIGHT_OFFSET + 'px';
|
||||
this.mainBox.style+=('height: ' + height);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user