From 9d791ac9fabeffb6a8949a49266cab458c80a951 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 13 Oct 2015 17:38:26 +0200 Subject: [PATCH] dash: Ensure style for icon size computation StIcon will skip loading the texture when its theme node is unset (which may happen on style changes while the widget is hidden). While our size request to compute the dash icon size will create the icon's theme node if necessary (and of all its parents), a missing texture can still throw off our computation. Make sure this doesn't happen by ensuring the icon's style first, so the texture is updated in response to StWidget::style-changed if necessary. https://bugzilla.gnome.org/show_bug.cgi?id=745649 --- js/ui/dash.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/ui/dash.js b/js/ui/dash.js index e809f87ab..db23a3b66 100644 --- a/js/ui/dash.js +++ b/js/ui/dash.js @@ -647,6 +647,7 @@ const Dash = new Lang.Class({ let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor; // Enforce the current icon size during the size request + firstIcon.icon.ensure_style(); let [currentWidth, currentHeight] = firstIcon.icon.get_size(); firstIcon.icon.set_size(this.iconSize * scaleFactor, this.iconSize * scaleFactor); [minHeight, natHeight] = firstButton.get_preferred_height(-1);