GNOME Bugzilla – Bug 786145
Folders' subicons not rendered properly on Hi DPI displays
Last modified: 2017-08-11 10:49:33 UTC
On High DPI displays where the current resolution changes the value of scaling-factor to something > 1 (i.e. 2 in my 13" 3200x1800 display), the 4 subicons that are part of the folders are incorrectly rendered: Instead of taking 40% of the folder icon's real state each, they are rendered so that each of them take 100% of the folder icon's real state, meaning that only one is rendered "inside" the folder, and the other ones are rendered outside of it.
Created attachment 357398 [details] [review] Explicitly set the width and height for subicons' containers in folders This is the patch we landed in Endless OS and fixed the problem for us there. Unfortunately, I don't have upstream GNOME running on a High DPI display so I could not fully test this locally. However, I did `gsettings set org.gnome.desktop.interface scaling-factor 2` on my Fedora 26 VM to test the patch and it seems to fix the very same problem there, so I'm proposing it here as well, as it's a simple patch anyway.
Review of attachment 357398 [details] [review]: ::: js/ui/appDisplay.js @@ +1176,3 @@ if (i < numItems) { let texture = this._allItems[i].app.create_icon_texture(subSize); + bin = new St.Bin({ child: texture, width: subSize, height: subSize }); Mmh, I really would expect the bin to pick up the child's size in this case. But anyway, if we are already setting an explicit size, the code could be rewritten more concisely as: let bin = new St.Bin({ width: subSize, height: subSize }); if (i < numItems) bin.child = this._allItems[i].app.create_icon_texture(subSize); layout.attach(bin, ...);
Created attachment 357402 [details] [review] Explicitly set the width and height for subicons' containers in folders (In reply to Florian Müllner from comment #2) > Review of attachment 357398 [details] [review] [review]: Thanks for the review, see the newly attached patch addressing your comments (which I should have done already)
Review of attachment 357402 [details] [review]: LGTM
Fixed: https://git.gnome.org/browse/gnome-shell/commit/?id=d903978937499a365d5d8586b83eb7323b21efd0