From 96c3039d9af7cfce8b3b5059186950119c0b325f Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 23 Jul 2002 17:31:31 +0000 Subject: [PATCH] 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 --- src/motif/toolbar.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/motif/toolbar.cpp b/src/motif/toolbar.cpp index 03f2e08a9e..f62b739ad0 100644 --- a/src/motif/toolbar.cpp +++ b/src/motif/toolbar.cpp @@ -285,7 +285,10 @@ bool wxToolBar::Realize() wxControl* control = tool->GetControl(); wxSize sz = control->GetSize(); 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; break; -- 2.45.2