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
This commit is contained in:
parent
91b84e0b06
commit
a78e75775d
@ -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;
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user