Fix positioning wxPropertyGrid editor button
Button should be shifted by width, not by height value.
This commit is contained in:
@@ -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
|
// If button is narrow make it a square and move it to the correct position
|
||||||
s = but->GetSize();
|
s = but->GetSize();
|
||||||
if ( s.x < s.y )
|
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);
|
but->Move(p);
|
||||||
|
|
||||||
if ( selected->HasFlag(wxPG_PROP_READONLY) && !selected->HasFlag(wxPG_PROP_ACTIVE_BTN) )
|
if ( selected->HasFlag(wxPG_PROP_READONLY) && !selected->HasFlag(wxPG_PROP_ACTIVE_BTN) )
|
||||||
|
Reference in New Issue
Block a user