On Sun, 07 Aug 2022 17:30:16 -0700 Kenneth Porter wrote:
KP> On Windows 10. I've got a button with background colour set to blue and
KP> foreground to white. When I mouseover to click it, the button turns white
KP> text on very light grey background. I'm guessing this is normal Windows
KP> behaviour. What must I do to keep the button readable on mouseover? Perhaps
KP> set a special mouseover color to a slightly lighter blue?
This would be ideal, but I don't think we support this. In fact, looking
at the code, we seem to explicitly avoid changing the background colour in
the "hot" state (see the check for PBS_HOT in src/msw/anybutton.cpp).
We could add some MSW-specific MSWSetHotBackgroundColour() and use the
colour passed to it here, but it would arguably be better to just avoid
modifying the foreground colour in the hot state as well and use the
standard one as well. This is not ideal, as the button would basically lose
its custom appearance, but still better than making it completely
unreadable.
Please don't hesitate to make a PR (which should be relatively
straightforward) if this would be useful for you, but if not, please open
an issue for this as I don't think we have one yet (but please search for
it before opening just in case I forgot).
Thanks,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/