Applied patch [ 585436 ] motif toolbar control alignment fix

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2002-07-23 17:31:31 +00:00
parent 7227cefd3b
commit 96c3039d9a

View File

@ -285,7 +285,10 @@ bool wxToolBar::Realize()
wxControl* control = tool->GetControl(); wxControl* control = tool->GetControl();
wxSize sz = control->GetSize(); wxSize sz = control->GetSize();
wxPoint pos = control->GetPosition(); wxPoint pos = control->GetPosition();
control->Move(currentX, pos.y); // Allow a control to specify a y-offset by setting its initial position,
// but still don't allow it to position itself above the top margin.
int controlY = (pos.y > 0) ? currentY + pos.y : currentY;
control->Move(currentX, controlY);
currentX += sz.x + packing; currentX += sz.x + packing;
break; break;