Fix positioning wxPropertyGrid editor button

Button should be shifted by width, not by height
value.
This commit is contained in:
Artur Wieczorek 2020-04-14 20:45:05 +02:00
parent eec0fd271f
commit c34440ffee

View File

@ -1995,8 +1995,11 @@ wxWindow* wxPropertyGrid::GenerateEditorButton( const wxPoint& pos, const wxSize
// If button is narrow make it a square and move it to the correct position
s = but->GetSize();
if ( s.x < s.y )
but->SetSize(wxSize(s.y, s.y));
p.x = pos.x + sz.x - s.y;
{
s.x = s.y;
but->SetSize(s);
}
p.x = pos.x + sz.x - s.x;
but->Move(p);
if ( selected->HasFlag(wxPG_PROP_READONLY) && !selected->HasFlag(wxPG_PROP_ACTIVE_BTN) )