diff --git a/src/toolbars/ToolDock.cpp b/src/toolbars/ToolDock.cpp index 73e7224a6..cb199c0d0 100644 --- a/src/toolbars/ToolDock.cpp +++ b/src/toolbars/ToolDock.cpp @@ -331,7 +331,7 @@ int ToolDock::PositionBar( ToolBar *t, wxPoint & pos, wxRect & rect ) { // Add the new bars' dimensions to the mix tinfo[ct].rect = t->GetRect(); - tinfo[ct].min = t->GetSize(); + tinfo[ct].min = t->GetMinSize(); tindx = ct; ndx--; } diff --git a/src/toolbars/ToolManager.cpp b/src/toolbars/ToolManager.cpp index c5107b59d..7a8355d40 100644 --- a/src/toolbars/ToolManager.cpp +++ b/src/toolbars/ToolManager.cpp @@ -949,7 +949,7 @@ void ToolManager::OnMouse( wxMouseEvent & event ) // Retrieve the event position wxPoint pos = - ( (wxWindow *)event.GetEventObject() )->ClientToScreen( event.GetPosition() ); + ( (wxWindow *)event.GetEventObject() )->ClientToScreen( event.GetPosition() ) - mDragOffset; // Button was released...finish the drag if( !event.LeftIsDown() ) @@ -990,7 +990,7 @@ void ToolManager::OnMouse( wxMouseEvent & event ) else if( event.Dragging() && pos != mLastPos ) { // Make toolbar follow the mouse - mDragWindow->Move( pos - mDragOffset ); + mDragWindow->Move( pos ); // Remember to prevent excessive movement mLastPos = pos; @@ -1044,8 +1044,8 @@ void ToolManager::OnMouse( wxMouseEvent & event ) else { p.x = dr.GetLeft() + r.GetLeft(); - p.y = dr.GetTop() + r.GetTop() + - ( ( r.GetHeight() - mLeft->GetBox().GetHeight() ) / 2 ); + p.y = dr.GetTop() + r.GetTop() + mLeft->GetBox().GetHeight() / 2; + //JKC ( ( r.GetHeight() - mLeft->GetBox().GetHeight() ) / 2 ); mCurrent = mLeft; }