Hi everyone,
Trying to sort some bugs on Launchpad I dug into icon sizes a bit. In
previous conversations, Jon Cruz specified that Inkscape icon sizes
are defined in src/icon-sizes.h:
enum IconSize {
ICON_SIZE_INVALID = ::GTK_ICON_SIZE_INVALID,
ICON_SIZE_MENU = ::GTK_ICON_SIZE_MENU,
ICON_SIZE_SMALL_TOOLBAR = ::GTK_ICON_SIZE_SMALL_TOOLBAR,
ICON_SIZE_LARGE_TOOLBAR = ::GTK_ICON_SIZE_LARGE_TOOLBAR,
ICON_SIZE_BUTTON = ::GTK_ICON_SIZE_BUTTON,
ICON_SIZE_DND = ::GTK_ICON_SIZE_DND,
ICON_SIZE_DIALOG = ::GTK_ICON_SIZE_DIALOG,
ICON_SIZE_DECORATION
};
However, those definitions seem to have strange effects in the facts.
Namely:
- the toolbox has size "LARGE_TOOLBAR" but won't scale to 48 (displays
as >~16) or 32 (displays as <16)
http://dl.getdropbox.com/u/1047321/toolbox-bar.xcf
NB: I am linking to xcf images because they make it easy to compare
the different sizes in different layers
- the snapping toolbar has size "SMALL_TOOLBAR" but behaves the same
way regarding large sizes
http://dl.getdropbox.com/u/1047321/toolbars.xcf
- the custom size "DECORATION" affects:
. the color picker: 48 makes it bigger. the rest does not change
. the triangle at the end of the color picker strip: changes
correctly with all sizes, so it would seem that is working correctly
then. But since the color picker itself does not scale to the same
height, it usually appears too big or too small compared to it.
Ideally, it should always have the same height as the color picker
(hence be affected by the choice of size in the picker itself, which
is not the case currently)
. the lock and eye icon of the layer drop down, the zoom icon at the
top right corner of the canvas, and probably other places, which
display the same issue as the icons above
http://dl.getdropbox.com/u/1047321/custom-decoration.xcf
So there is a common pattern (hence a common fix?). Overall, it seems
that stock icons (i.e not Inkscape provided ones) scale, but Inkscape
icons do not scale. I understand this since Inkscape icons used to be
designed and rendered in a different way. However:
- I thought that recent changes to the icon handling would make
Inkscape icons behave as the rest (this was tested with rev 21339 and
I haven't seen any icon related changes in the svn log since, and with
no custom configuration in .config/Inkscape)
- even if they do not behave as the rest, they should at least display
at their maximum size when the GTK size it set higher that it (32 and
48).
Thanks in advance for any information on all this.
JiHO
---
http://jo.irisson.free.fr/