Blind attempt to fix MSW rendering bug.

This commit is contained in:
Jeff Young 2022-12-14 12:57:40 +00:00
parent 2f8cc84551
commit 355bfe1587
2 changed files with 5 additions and 1 deletions

View File

@ -217,6 +217,8 @@ void SPLIT_BUTTON::OnPaint( wxPaintEvent& WXUNUSED( aEvent ) )
// system colours return the right values, nor does wxRendererNative draw
// the borders correctly. So we add some empirically chosen hacks here.
// NOTE: KEEP THESE HACKS IN SYNC WITH STD_BITMAP_BUTTON
wxColor fg = wxSystemSettings::GetColour( wxSYS_COLOUR_BTNTEXT );
wxColor bg = wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE );

View File

@ -147,6 +147,8 @@ void STD_BITMAP_BUTTON::OnPaint( wxPaintEvent& WXUNUSED( aEvent ) )
// system colours return the right values, nor does wxRendererNative draw
// the borders correctly. So we add some empirically chosen hacks here.
// NOTE: KEEP THESE HACKS IN SYNC WITH SPLIT_BUTTON
wxColor fg = wxSystemSettings::GetColour( wxSYS_COLOUR_BTNTEXT );
wxColor bg = wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE );
@ -181,7 +183,7 @@ void STD_BITMAP_BUTTON::OnPaint( wxPaintEvent& WXUNUSED( aEvent ) )
// wxRendereNative doesn't handle dark mode on OSX.
drawBackground( r1 );
#else
r1.width += 2;
r1.width += 1;
wxRendererNative::Get().DrawPushButton( this, dc, r1, m_stateButton );
#endif