Minor adjustment for bitmap button size for GTK.

This commit is contained in:
Jeff Young 2022-12-26 23:09:43 +00:00
parent dee5357d4d
commit a18c2043c4
2 changed files with 10 additions and 4 deletions

View File

@ -245,7 +245,7 @@ void SPLIT_BUTTON::OnPaint( wxPaintEvent& WXUNUSED( aEvent ) )
dc.SetPen( fg ); dc.SetPen( fg );
} }
dc.DrawRoundedRectangle( aRect, aRect.height / 4 ); dc.DrawRoundedRectangle( aRect, aRect.height / 4.0 );
}; };
#endif #endif
@ -260,7 +260,10 @@ void SPLIT_BUTTON::OnPaint( wxPaintEvent& WXUNUSED( aEvent ) )
// wxRendereNative doesn't handle dark mode on OSX. // wxRendereNative doesn't handle dark mode on OSX.
drawBackground( r1 ); drawBackground( r1 );
#else #else
#ifdef _WXMSW_
r1.width += 2; r1.width += 2;
#endif
wxRendererNative::Get().DrawPushButton( this, dc, r1, m_stateButton ); wxRendererNative::Get().DrawPushButton( this, dc, r1, m_stateButton );
#endif #endif

View File

@ -173,7 +173,7 @@ void STD_BITMAP_BUTTON::OnPaint( wxPaintEvent& WXUNUSED( aEvent ) )
dc.SetPen( fg ); dc.SetPen( fg );
} }
dc.DrawRoundedRectangle( aRect, aRect.height / 4 ); dc.DrawRoundedRectangle( aRect, aRect.height / 4.0 );
}; };
#endif #endif
@ -187,7 +187,10 @@ void STD_BITMAP_BUTTON::OnPaint( wxPaintEvent& WXUNUSED( aEvent ) )
// wxRendereNative doesn't handle dark mode on OSX. // wxRendereNative doesn't handle dark mode on OSX.
drawBackground( r1 ); drawBackground( r1 );
#else #else
#ifdef __WXMSW__
r1.width += 1; r1.width += 1;
#endif
wxRendererNative::Get().DrawPushButton( this, dc, r1, m_stateButton ); wxRendererNative::Get().DrawPushButton( this, dc, r1, m_stateButton );
#endif #endif