Version: (using KDE 4.4.0) OS: Linux Installed from: Unlisted Binary Package I have written a small app in QT4 which works perfectly, but there's a visual funny which only occurs with the Oxygen theme. I have some latching buttons which should display a different icon when they're depressed or released, but the icon change isn't happening. If I bring up my app and change the theme from the KDE system settings, the effect comes and goes on the fly! See the screen shot below. The left hand side is Oxygen, the right hand is Plastique. http://www.tallegra.nildram.co.uk/Oxygen%20button%20problem.png This happens with at least KDE 4.3.5 (Fedora 11/12 distro standard) and 4.4.0 direct from the kde-unstable repo.
Interesting bug. I guess I could write a testcase similar to yours. But if your sources are too big, could you actually post them somewhere so that I'm sure we're comparing identical things ? (in the meanwhile I'll give it a shot on my side) Hugo
Complete minimal QT Creator project here: http://www.tallegra.nildram.co.uk/bugtest.tar.gz
Thanks a lot for the pointer. In fact since there is nothing in oxygen that plays with the button icon, I rather suspect a bug in kstyle (from which oxygen inherits, and plastique doesn't). Looking into it.
SVN commit 1093328 by hpereiradacosta: Check on button state (On/Off) when chosing which icon is to be drawn in a push button. BUG: 227685 M +8 -2 kstyle.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1093328
Well that was efficient :-) I'm a bit surprised that it wasn't spotted before, though. I'm an experienced programmer, but this was quite literally the first Linux GUI app I've ever written. Am I the only person to use icons on buttons that way, or the only person who uses a kstyle-derived theme?
Since Oxygen inherits from KStyle, you are certainly not the only KStyle user :) But icons usually do not have a separate "On" state, so that bug remained unnoticed.
actually, in terms of UI design, I always had a hard time understanding checkboxes (as in your example) that use two different icons for On and Off state. Because there is redundant (and sometime misleading) information in that thing: two different icons distinguish the two states of the button, which is already done by the visual on/off rendering (raised/or sunken). When I press on the sunken button with the second icon, do I negate (back to off state) the state corresponding to the second icon ? Or to the first ? (in your case you negate the state corresponding to the first icon, which effectively correspond to checking the state of the second icon, which contradicts the fact that the button goes from sunken to raised) (does that make sense ?) Would have been different if you had a regular button which changes icon each time you press on it ... Anyway: just my two cents, and anyway, this was a (now fixed) bug in kstyle and oxygen.