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 671657 - Scale symbolic icons according to the current resolution
Scale symbolic icons according to the current resolution
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: 2012-03-08 15:30 UTC by Rui Matos
Modified: 2012-03-09 11:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
st-theme-context: Add st_get_default_resolution() (1.58 KB, patch)
2012-03-08 15:30 UTC, Rui Matos
none Details | Review
st-icon: Scale symbolic icons according to the current resolution (1.76 KB, patch)
2012-03-08 15:30 UTC, Rui Matos
none Details | Review
css: Symbolic icons size must actually be specified relative to font size (1.36 KB, patch)
2012-03-08 16:38 UTC, Rui Matos
committed Details | Review

Description Rui Matos 2012-03-08 15:30:15 UTC
This fixes icons not sizing along with text since
http://git.gnome.org/browse/gnome-shell/commit/?id=a277f8e0e1003b6c60d82f37f557e115a2781419
Comment 1 Rui Matos 2012-03-08 15:30:18 UTC
Created attachment 209256 [details] [review]
st-theme-context: Add st_get_default_resolution()

This makes whatever value St considers the default resolution to be publicly
available.
Comment 2 Rui Matos 2012-03-08 15:30:23 UTC
Created attachment 209257 [details] [review]
st-icon: Scale symbolic icons according to the current resolution

Symbolic icons are supposed to be treated as text so we must scale them
according to the current resolution as well.
Comment 3 Florian Müllner 2012-03-08 15:54:31 UTC
Review of attachment 209257 [details] [review]:

I'm not sure that solution is correct (though I suggested something like that on IRC in the first place) - if the icon size is specified using anything other than px, wouldn't we end up accounting for the resolution twice?
Comment 4 Florian Müllner 2012-03-08 15:56:59 UTC
Another observation: resolution changes don't affect text that has the font-size specified in px; so the current behavior of StIcon is actually consistent with text already.
Comment 5 Rui Matos 2012-03-08 16:38:23 UTC
Created attachment 209261 [details] [review]
css: Symbolic icons size must actually be specified relative to font size

Commit a277f8e0e1003b6c60d82f37f557e115a2781419 prevents icons from being
scaled when the global desktop resolution changes which is wrong since
symbolic icons are supposed to be treated like text.

Instead of specifying their size in pixels, go back to em but with a value
adjusted to the new font size that actually yields unscaled symbolic icons for
the default resolution.
Comment 6 Owen Taylor 2012-03-08 19:00:17 UTC
Review of attachment 209261 [details] [review]:

Looks fine (assuming that we're sure we want the search icon to be the same size as the icons, not smaller as it was earlier)
Comment 7 Rui Matos 2012-03-09 11:58:06 UTC
(In reply to comment #6)
> Review of attachment 209261 [details] [review]:
>
> Looks fine (assuming that we're sure we want the search icon to be the same
> size as the icons, not smaller as it was earlier)

You're right, font size is 12pt on the search entry so 1em is the right value
there. Pushed with that fix.

Attachment 209261 [details] pushed as 9b5bb62 - css: Symbolic icons size must actually be specified relative to font size