https://bugs.winehq.org/show_bug.cgi?id=57521
Bug ID: 57521 Summary: Some control text colors are always black when theming is enabled Product: Wine Version: 10.0-rc1 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: stefan@codeweavers.com Distribution: ---
Created attachment 77564 --> https://bugs.winehq.org/attachment.cgi?id=77564 Red/Green text with theming enabled
I recently tried to adapt light.msstyles into a dark style theme. Among the issues I ran into is that when theming is enabled, some controls always have black text regardless of what's set in the registry. As far as I can see this applies to Buttons, Static controls, tabulars, but possibly others too.
The issue isn't obvious with light.msstyles because it sets the colors in question to black anyhow.
I'm attaching two screenshots that try to illustrate the issue - In both cases I have set "window text" to green and "control text" (aka "ButtonText" in the registry) to red. You can see that it is followed differently when theming is on vs off.
I don't think the particular colors are taken out of the png resources in the .msstyles DLL since they affect text.
https://bugs.winehq.org/show_bug.cgi?id=57521
--- Comment #1 from Stefan Dösinger stefan@codeweavers.com --- Created attachment 77565 --> https://bugs.winehq.org/attachment.cgi?id=77565 Red/Green text without theming
https://bugs.winehq.org/show_bug.cgi?id=57521
--- Comment #2 from Stefan Dösinger stefan@codeweavers.com --- Created attachment 77566 --> https://bugs.winehq.org/attachment.cgi?id=77566 Attempted hack
Here's my attempt to hack the static control into submission. It quickly turned out to be wrong since it overrides colors set via WM_CTLCOLORSTATIC - e.g. the Red "Wine" text in the winecfg about page loses its custom color.
I tried to follow the path of the registry colors through the WM_CTLCOLORSTATIC and similar messages but failed to do so while sitting in the airplane.
https://bugs.winehq.org/show_bug.cgi?id=57521
Zhiyi Zhang zzhang@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |zzhang@codeweavers.com
--- Comment #3 from Zhiyi Zhang zzhang@codeweavers.com --- Generally, text colors are specified in the [SysMetrics] section in light.rc, for example, see "System colors". Then for individual controls, there is the "TextColor" property, for example, "TextColor = 0 0 0" in "[Button.Groupbox]". Properties are also inherited from parents. So if "[Button.Commandlink(Hot)]" doesn't specify a TextColor, then it will search "[Button.Commandlink]" and then "[Button]".
https://bugs.winehq.org/show_bug.cgi?id=57521
--- Comment #4 from Zhiyi Zhang zzhang@codeweavers.com --- Created attachment 77572 --> https://bugs.winehq.org/attachment.cgi?id=77572 changing groupbox text color