From a78e75775d20bd626ec0ee8670c925ed62d8149c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 10 Feb 2011 16:30:28 +0100 Subject: [PATCH] base-icon: Enforce the requested icon size Mainly due to StTextureCache's way of handling fallback icons, an implementation of BaseIcon.createIcon() may return an icon smaller than the requested size. Given that BaseIcon is not used for isolated elements, but rather for groups of related items (App view, Dash, Search Results, ...), having some elements end up with the wrong size is more annoying than having some elements end up ugly due to scaling, so explicitly enforce the requested icon size. https://bugzilla.gnome.org/show_bug.cgi?id=642043 --- js/ui/iconGrid.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js index 91cc0c3f4..f2d046cb2 100644 --- a/js/ui/iconGrid.js +++ b/js/ui/iconGrid.js @@ -126,6 +126,12 @@ BaseIcon.prototype = { this.icon.destroy(); this.iconSize = size; this.icon = this.createIcon(this.iconSize); + + // The icon returned by createIcon() might actually be smaller than + // the requested icon size (for instance StTextureCache does this + // for fallback icons), so set the size explicitly. + this.icon.set_size(this.iconSize, this.iconSize); + this._iconBin.child = this.icon; },