dash: Subtract vertical margins from availHeight

The vertical margins are part of this._maxHeight, so we need to subtract
it in order to propery limit icon sizes when the available height is too
small.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2191>
This commit is contained in:
Jonas Dreßler 2022-02-16 20:04:03 +01:00 committed by Marge Bot
parent b9abf6fcf5
commit 2607880bf6

View File

@ -610,6 +610,7 @@ var Dash = GObject.registerClass({
(iconChildren.length - 1) * spacing;
let availHeight = this._maxHeight;
availHeight -= this.margin_top + this.margin_bottom;
availHeight -= this._background.get_theme_node().get_vertical_padding();
availHeight -= themeNode.get_vertical_padding();
availHeight -= buttonHeight - iconHeight;