After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 642043 - Wrong sized icons in the dash
Wrong sized icons in the dash
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-02-10 17:04 UTC by Florian Müllner
Modified: 2011-02-25 23:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
base-icon: Enforce the requested icon size (1.42 KB, patch)
2011-02-10 17:04 UTC, Florian Müllner
committed Details | Review
baseIcon: Do not make the box depend on the actual icon size (1.40 KB, patch)
2011-02-18 19:25 UTC, drago01
rejected Details | Review

Description Florian Müllner 2011-02-10 17:04:20 UTC
Some icons - namely fallback icons from _NET_WM_ICON - end up with a smaller icon size than requested. Apart from looking out of place, the dash's Fittsability is broken for those icons. At least in my opinion, following the correct icon size is more important than looking pretty (if any of the fallback icons can be called pretty), so enforce the icon size (resulting in fallback icons being scaled up).
Comment 1 Florian Müllner 2011-02-10 17:04:22 UTC
Created attachment 180606 [details] [review]
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.
Comment 2 Owen Taylor 2011-02-10 19:09:42 UTC
This worries me if an icon in an icon theme is a few pixels smaller than the nominal size in the theme and then gets scaled up and fuzzed. Are we sure that's not going to happen?
Comment 3 drago01 2011-02-11 09:29:19 UTC
(In reply to comment #2)
> This worries me if an icon in an icon theme is a few pixels smaller than the
> nominal size in the theme and then gets scaled up and fuzzed. Are we sure
> that's not going to happen?

Well no one really creates an icon that is lets say 46x46 instead of 48x48 .... it never made sense.
Comment 4 Florian Müllner 2011-02-11 10:40:42 UTC
(In reply to comment #2)
> This worries me if an icon in an icon theme is a few pixels smaller than the
> nominal size in the theme and then gets scaled up and fuzzed. Are we sure
> that's not going to happen?

Yesterday I had a problem with edit-find-symbolic, which showed up as a gray rectangle. Apparently this was because the icon's dimensions were slightly off (sth like 16.08 x 16.08) and gtk-update-icon-cache refused to add it to the cache. I have no idea if that's an oddity of symbolic icons or if icon sizes are always enforced (I've quickly skimmed through the code but didn't find anything obvious which suggests this behavior) - I'm gonna check with Jakub later.

Also in the case of the dash, being a few pixels smaller is enough to break Fitts'ability for an icon.
Comment 5 Dan Winship 2011-02-11 12:25:54 UTC
(In reply to comment #4)
> Apparently this was because the icon's dimensions were slightly off
> (sth like 16.08 x 16.08)

You may want to mention this on bug 634023
Comment 6 drago01 2011-02-17 13:14:03 UTC
(In reply to comment #4)
>
> Also in the case of the dash, being a few pixels smaller is enough to break
> Fitts'ability for an icon.
>

I have been running this for a while and even though the icons of the affected apps looks ugly (blurry due to being scaled up), the actual experience seems better.

The alternative would be to make the surrounding box not depend on the icon size and just center the icon in it (like it is done for alt-tab).
Comment 7 drago01 2011-02-18 19:25:52 UTC
Created attachment 181264 [details] [review]
baseIcon: Do not make the box depend on the actual icon size

The icon returned by createIcon() might actually be smaller than
the requested icon size (for instance StTextureCache does this
for fallback icons), so make sure that atleast the surrounding
box has the requested size.

This way we are consistent with what the we do in the appSwitcher
and compared to the alternative of just scaling the icons up they do
not end up being blurry.
Comment 8 Florian Müllner 2011-02-18 20:23:02 UTC
Review of attachment 181264 [details] [review]:

I tried something like that before, it breaks the animations of icon size changes.
Comment 9 Florian Müllner 2011-02-25 15:39:17 UTC
I discussed this bug with Jon and Jakub yesterday, and both preferred scaling over padding. So, to push the bug forward - does the patch need further review?


(In reply to comment #5)
> (In reply to comment #4)
> > Apparently this was because the icon's dimensions were slightly off
> > (sth like 16.08 x 16.08)
> 
> You may want to mention this on bug 634023

Sorry that I didn't, but I was actually wrong - apparently the symbolic icon theme is developed in a single SVG which is split by a script to create the final icons. Due to an error in the "master" SVG, the region to create the icon in question was wrong, so it didn't have anything to do with gtk-update-icon-theme or the size of the final icon.
Comment 10 drago01 2011-02-25 22:21:24 UTC
Review of attachment 180606 [details] [review]:

Patch looks good, given that the designers want this solution we should just go ahead and do it.
Comment 11 Florian Müllner 2011-02-25 23:09:54 UTC
Attachment 180606 [details] pushed as a78e757 - base-icon: Enforce the requested icon size