Don't use custom background color in PBS_HOT state
MSW buttons are highlighted by the theme when the mouse hovers over them. This servers as a feedback to the user that the button is clickable, so it's desirable to preserve it even if the button uses a custom background color.
This commit is contained in:
parent
c9b1ebf816
commit
7b85f232f9
@ -1131,7 +1131,7 @@ void DrawXPBackground(wxAnyButton *button, HDC hdc, RECT& rectBtn, UINT state)
|
||||
::InflateRect(&rectBtn, -margins.cxLeftWidth, -margins.cyTopHeight);
|
||||
::InflateRect(&rectBtn, -XP_BUTTON_EXTRA_MARGIN, -XP_BUTTON_EXTRA_MARGIN);
|
||||
|
||||
if ( button->UseBgCol() )
|
||||
if ( button->UseBgCol() && iState != PBS_HOT )
|
||||
{
|
||||
COLORREF colBg = wxColourToRGB(button->GetBackgroundColour());
|
||||
AutoHBRUSH hbrushBackground(colBg);
|
||||
|
Loading…
Reference in New Issue
Block a user