After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 316322 - XP Luna Theme does not observe background colors for buttons
XP Luna Theme does not observe background colors for buttons
Status: RESOLVED DUPLICATE of bug 300780
Product: gtk+
Classification: Platform
Component: Backend: Win32
unspecified
Other Windows
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2005-09-14 16:53 UTC by Kevin Conaway
Modified: 2006-03-10 16:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Code to reproduce the bug (17.18 KB, application/octet-stream)
2005-09-14 16:55 UTC, Kevin Conaway
Details
PyGTK sample code (552 bytes, text/plain)
2005-10-04 20:27 UTC, Kevin Conaway
Details

Description Kevin Conaway 2005-09-14 16:53:36 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.
Comment 1 Kevin Conaway 2005-09-14 16:55:29 UTC
Created attachment 52237 [details]
Code to reproduce the bug

Attached are two pygtk scripts that reproduce the bug.
Comment 2 Kevin Conaway 2005-10-04 20:27:08 UTC
Created attachment 53031 [details]
PyGTK sample code

Python code to reproduce the bug
Comment 3 Jernej Simončič 2005-10-04 21:42:30 UTC
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.
Comment 4 Tor Lillqvist 2005-10-04 21:50:15 UTC
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?
Comment 5 Kevin Conaway 2005-10-04 22:13:26 UTC
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?
Comment 6 Tor Lillqvist 2005-10-04 22:36:43 UTC
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.
Comment 7 Dominic Lachowicz 2005-10-04 22:58:37 UTC
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.
Comment 8 Kevin Conaway 2005-10-05 15:17:21 UTC
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.
Comment 9 Dominic Lachowicz 2005-10-05 16:32:56 UTC
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.
Comment 10 Dominic Lachowicz 2006-01-16 19:26:15 UTC
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...
Comment 11 Dominic Lachowicz 2006-03-10 16:22:29 UTC
Duplicate

*** This bug has been marked as a duplicate of 300780 ***