Add additional buffer space around cell text buttons
The baseline -1 buffer works for some GTK themes but not others. -3 appears to work for chunky themes like those used in KDE (and others). Fixes https://gitlab.com/kicad/code/kicad/issues/5690
This commit is contained in:
parent
810a49ef1b
commit
b87e4efc68
|
@ -59,7 +59,12 @@ wxString GRID_CELL_TEXT_BUTTON::GetValue() const
|
|||
void GRID_CELL_TEXT_BUTTON::SetSize( const wxRect& aRect )
|
||||
{
|
||||
wxRect rect( aRect );
|
||||
rect.Inflate( -1 );
|
||||
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
|
||||
|
||||
#if defined( __WXMAC__ )
|
||||
rect.Inflate( 3 ); // no FOCUS_RING, even on Mac
|
||||
|
|
Loading…
Reference in New Issue