Fix positioning wxPropertyGrid editor button
Button should be shifted by width, not by height value.
This commit is contained in:
parent
eec0fd271f
commit
c34440ffee
@ -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) )
|
||||
|
Loading…
Reference in New Issue
Block a user