[gnome-shell] dash: Ensure style for icon size computation
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] dash: Ensure style for icon size computation
- Date: Tue, 13 Oct 2015 18:22:26 +0000 (UTC)
commit 14c52bb00a9748f9ae2c0f13bcb17fb460d975a1
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Oct 13 17:38:26 2015 +0200
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 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/dash.js b/js/ui/dash.js
index e809f87..db23a3b 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]