Bug #427
Wrong GTK icon size for volume?
100%
Description
Hi,
I'm using Audacious 3.4.3 on Ubuntu 14.04 (custom variant with Openbox). The problem has been nagging me for some time it has not appeared with Ubuntu 14.04. Also, I'm using a custom icon theme for my desktop: Faenza (by Matthieu "Tiheum" James; see http://tiheum.deviantart.com/art/Faenza-Icons-173323228).
The problem is that when using Audacious with the GTK skin, the volume icon has the wrong appearance: it is silver instead of black, while the other controls appear as expected. Checking the Faenza icon theme, I noticed that the volume icon is silver for sizes 32 and up (probably for dark toolbar or something), and black for 16, 22 & 24. So it looks like Audacious is using small icons for the toolbar icons (as they're the right color), except for the volume icon which uses a bigger icon ("scalable" size, maybe?) which is rescaled.
Is there a reason for Audacious to use a different size as a source for the volume icon than the other buttons of the toolbar?
History
#1 Updated by John Lindgren over 10 years ago
GTK+ is always changing (and breaking) things like this. What GTK+ version do you have, and does the problem still appear if you install the latest from Git [1]? (I would recommend installing it under /opt rather than /usr.)
#2 Updated by abel thorne over 10 years ago
In Ubuntu 14.04, I have apparently GTK2 2.24.23 and GTK3 3.10.8. I don't know how to install latest version from Git (and would prefer not to break my system but I can test things in a virtual machine).
#3 Updated by John Lindgren over 10 years ago
Installing under /opt will not break your system (that's what /opt is there for). In fact, if you make a folder /opt/gtk owned by a normal user, then you can install there without even needing root.
I was using 3.10.8 until recently in Arch Linux, and the volume icon was the same size as all the others on the toolbar. Does the problem still appear if you use the Gnome icon theme? It may be that Faenza has missing icons in some sizes.
#4 Updated by abel thorne over 10 years ago
I was using 3.10.8 until recently in Arch Linux, and the volume icon was the same size as all the others on the toolbar. Does the problem still appear if you use the Gnome icon theme? It may be that Faenza has missing icons in some sizes.
I think you misunderstood my problem. It's not that it looks bigger in the toolabr or something like that. The problem is that every icon in the toolbar has the right size (not sure if it's 22 or 24) but while the other icons get the right source icon (e.g. media-skip-forward.png at size 24), the volume control icon seems to get a larger size icon (maybe "scalable", I don't know) and is rescaled on the fly so it appears the right size.
I'm not sure it's a bug, it might be this way for some reason I don't know but I assume that unless there is a specific reason for it, Audacious should get volume-control.png (or whatever it's called) as size 24 and not at a larger size and rescale it at 24.
The problem isn't the Faenza icon theme either, it only led me to discover that there was something happening. I could fix the theme on my side so that the problem is not visible but it would still be there.
I'm not sure I'm really clear about that (sorry, english isn't my native language).
#5 Updated by abel thorne over 10 years ago
- File audacious_issue.png audacious_issue.png added
I've made a picture so that it might be clearer. (See attachment.)
As you can see, the toolbar buttons are black except the volume control which is silver. When you see how the Faenza theme is made, it appears that to look that way, the control buttons are taken from icons 16 to 24 in size while the volume icon is from 32 and up (but rescaled to be smaller). If they were all from 16-24, the volume would be black and if they were all from 32+, the controls/playlist icons would look like chromed buttons.
It's pretty weird that the source icons for the buttons icons are not the same size than the volume icon. To me, it looks like a bug but maybe it's a GTK "feature" that manages the volume in a different way?
The problem is not visible with the GNOME theme because the icons have the same general look at every size, unlike Faenza.
#6 Updated by John Lindgren over 10 years ago
Okay, I can reproduce the problem with Faenza if I downgrade GTK+ to 3.10.7 (and it is not due to missing icons). It seems to be fixed in GTK+ 3.12.
#7 Updated by abel thorne over 10 years ago
Oh, okay, so it's a GTK bug, not Audacious. Thanks for the info, I'll see if I can upgrade GTK.
#8 Updated by John Lindgren over 10 years ago
- Category set to plugins/gtkui
- Status changed from New to Closed
- Target version set to 3.5
- % Done changed from 0 to 100
I did a little more digging, and it looks like this can be fixed in Audacious after all, without needing to update GTK+. In GTK+ 3.10, toolbar icons default to 24x24, while the volume button defaults to 18x18. Faenza (like most themes) doesn't have 18x18 icons, so GTK+ picks a larger one and scales it down. In GTK+ 3.12, there are curiously enough two separate changes that each would have solved the problem: [1] changed the default size for the volume button to 16x16, which prevents the scaling, and [2] switched to using symbolic icons, which are rendered as black and thus happen to match. Regardless of the GTK+ changes, [3] solves the problem by setting the volume icon size to 24x24 to match the rest of the buttons.
[1] https://git.gnome.org/browse/gtk+/commit/?id=b617b003ef9e3d42ecf17b42348f72f87bca78a2
[2] https://git.gnome.org/browse/gtk+/commit?id=afa9339e7106432af6622824d9c8c0a67bbf543c
[3] https://github.com/audacious-media-player/audacious-plugins/commit/9b78e92c26f56404c72b46785ff4643e316ff2f1