Skip to content

Commit 158adf0

Browse files
committed
wxMSW: wxAnyButton support dark mode
1 parent 7338c4d commit 158adf0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/msw/anybutton.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,10 +1208,10 @@ void DrawButtonFrame(HDC hdc, RECT& rectBtn,
12081208
RECT r;
12091209
::CopyRect(&r, &rectBtn);
12101210

1211-
COLORREF clrBlack = ::GetSysColor(COLOR_3DDKSHADOW),
1212-
clrGrey = ::GetSysColor(COLOR_3DSHADOW),
1213-
clrLightGr = ::GetSysColor(COLOR_3DLIGHT),
1214-
clrWhite = ::GetSysColor(COLOR_3DHILIGHT);
1211+
COLORREF clrBlack = wxSystemSettings::GetColour(wxSYS_COLOUR_3DDKSHADOW).GetPixel(), //::GetSysColor(COLOR_3DDKSHADOW)
1212+
clrGrey = wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW).GetPixel(), //::GetSysColor(COLOR_3DSHADOW),
1213+
clrLightGr = wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT).GetPixel(), //::GetSysColor(COLOR_3DLIGHT),
1214+
clrWhite = wxSystemSettings::GetColour(wxSYS_COLOUR_3DHILIGHT).GetPixel(); //::GetSysColor(COLOR_3DHILIGHT);
12151215

12161216
r.right--;
12171217
r.bottom--;
@@ -1438,7 +1438,7 @@ bool wxAnyButton::MSWOnDraw(WXDRAWITEMSTRUCT *wxdis)
14381438
if ( !HasFlag(wxBORDER_NONE) )
14391439
{
14401440
#if wxUSE_UXTHEME
1441-
if ( wxUxThemeIsActive() )
1441+
if ( wxUxThemeIsActive() && !wxSystemSettings::GetAppearance().IsDark())
14421442
{
14431443
DrawXPBackground(this, hdc, rectBtn, state);
14441444
}

0 commit comments

Comments
 (0)