GNOME Bugzilla – Bug 671657
Scale symbolic icons according to the current resolution
Last modified: 2012-03-09 11:58:09 UTC
This fixes icons not sizing along with text since http://git.gnome.org/browse/gnome-shell/commit/?id=a277f8e0e1003b6c60d82f37f557e115a2781419
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.
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.
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?
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.
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.
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)
(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