GNOME Bugzilla – Bug 316322
XP Luna Theme does not observe background colors for buttons
Last modified: 2006-03-10 16:22:29 UTC
Distribution/Version: XP If you set a background color on a Button in the Windows XP version of Wimp, it does not honor the color. This exists only in the Luna theme for Windows XP. It does however work in Windows 2000 or the classic theme on Windows XP.
Created attachment 52237 [details] Code to reproduce the bug Attached are two pygtk scripts that reproduce the bug.
Created attachment 53031 [details] PyGTK sample code Python code to reproduce the bug
That's an XP-theming issue - theme colors override everything. The same thing happens in native Windows applications, and not only that - try setting the colors yourself in the Advanced window of Display properties -> Apperance when XP themes are enabled.
How does the corresponding thing work on X11, BTW? If a GTK theme specifies the bg colour of buttons, will a gtk_widget_modify_bg() call in the app have any effect?
I'm just curious as to why it only happens in the Luna theme, not the classic theme or in Windows 2000. Is there a way around this?
Because the ms-windows theme engine checks whether a XP style theme is active, and works differently if it isn't? Not without changing the source code.
The ms-windows theme checks whether "Luna" is active or not. If Luna is active, then it lets Luna draw the widgets. This may mean that certain GtkStyle settings aren't observed. If Luna is not active, we draw the widgets ourselves.
Is there any way around this? To me, it seems that the settings should be uniform across Windows platforms. The "luna" theme is the default theme on Windows XP machines and most users don't bother to change it.
No, the settings should be uniform with whatever the UxTheme tells us they are. We strive to behave like a native Windows app behaves, depending on whatever registry settings and themes are active, not how a Windows app might behave if you were running on Windows 2000.
WRT comment #4: The only way that I can think of around this behavior would be to determine whether the style is "dirty" or not (can you even do that?) and then fall-back to the Win2k-style drawing code, since on WinXP, Luna does all of our drawing for us. I can only imagine how horribly ugly the resulting button would be...
Duplicate *** This bug has been marked as a duplicate of 300780 ***