Try to display '...' text on editor buttons more consistently on wxGTK. This is done by having minimum fixed width and by reducing size of used font.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55668 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1999,6 +1999,12 @@ wxWindow* wxPropertyGrid::GenerateEditorButton( const wxPoint& pos, const wxSize
|
|||||||
if ( s.x > m_lineHeight )
|
if ( s.x > m_lineHeight )
|
||||||
s.x = m_lineHeight;
|
s.x = m_lineHeight;
|
||||||
|
|
||||||
|
#ifdef __WXGTK__
|
||||||
|
// On wxGTK, take fixed button margins into account
|
||||||
|
if ( s.x < 25 )
|
||||||
|
s.x = 25;
|
||||||
|
#endif
|
||||||
|
|
||||||
wxPoint p(pos.x+sz.x-s.x,
|
wxPoint p(pos.x+sz.x-s.x,
|
||||||
pos.y+wxPG_BUTTON_SIZEDEC-wxPG_NAT_BUTTON_BORDER_Y);
|
pos.y+wxPG_BUTTON_SIZEDEC-wxPG_NAT_BUTTON_BORDER_Y);
|
||||||
|
|
||||||
@@ -2008,7 +2014,13 @@ wxWindow* wxPropertyGrid::GenerateEditorButton( const wxPoint& pos, const wxSize
|
|||||||
#endif
|
#endif
|
||||||
but->Create(GetPanel(),wxPG_SUBID2,wxS("..."),p,s,wxWANTS_CHARS);
|
but->Create(GetPanel(),wxPG_SUBID2,wxS("..."),p,s,wxWANTS_CHARS);
|
||||||
|
|
||||||
but->SetFont( m_captionFont );
|
#ifdef __WXGTK__
|
||||||
|
wxFont font = GetFont();
|
||||||
|
font.SetPointSize(font.GetPointSize()-2);
|
||||||
|
but->SetFont(font);
|
||||||
|
#else
|
||||||
|
but->SetFont(GetFont());
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ( selected->HasFlag(wxPG_PROP_READONLY) )
|
if ( selected->HasFlag(wxPG_PROP_READONLY) )
|
||||||
|
Reference in New Issue
Block a user