Fix Mac button-text grid control spacing.
(cherry picked from commit 9fb3032c77
)
This commit is contained in:
parent
c6c4f9ae4b
commit
cfae33e7a8
|
@ -59,10 +59,17 @@ wxString GRID_CELL_TEXT_BUTTON::GetValue() const
|
||||||
void GRID_CELL_TEXT_BUTTON::SetSize( const wxRect& aRect )
|
void GRID_CELL_TEXT_BUTTON::SetSize( const wxRect& aRect )
|
||||||
{
|
{
|
||||||
wxRect rect( aRect );
|
wxRect rect( aRect );
|
||||||
rect.Inflate( -1 );
|
|
||||||
|
|
||||||
#if defined( __WXMAC__ )
|
#if defined( __WXMAC__ )
|
||||||
rect.Inflate( 3 ); // no FOCUS_RING, even on Mac
|
rect.Inflate( 2 ); // ignore FOCUS_RING
|
||||||
|
#elif defined( __WXGTK__ )
|
||||||
|
rect.Inflate( -3 ); // The -3 is a very sad hack here. Some GTK themes overrun the
|
||||||
|
// default -1, preventing display. Unfortunately, we don't appear to
|
||||||
|
// have a good method of finding the current margin needed.
|
||||||
|
// Some GTK resize events seem to update the cell size but not all and
|
||||||
|
// not consistently.
|
||||||
|
#else
|
||||||
|
rect.Inflate( -1 );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Combo()->SetSize( rect, wxSIZE_ALLOW_MINUS_ONE );
|
Combo()->SetSize( rect, wxSIZE_ALLOW_MINUS_ONE );
|
||||||
|
|
Loading…
Reference in New Issue