mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-16 16:10:06 +02:00
Incremental improvement to toolbars.
Fixes the undock-redock moving the toolbar to a new position. No change expected to 'dock marker vanishes' in linux issue.
This commit is contained in:
parent
d48f03518f
commit
a94bfed0cc
@ -1026,6 +1026,11 @@ void ToolManager::OnMouse( wxMouseEvent & event )
|
||||
br.SetBottom( br.GetBottom() + 20 );
|
||||
br.SetPosition( mBotDock->GetParent()->ClientToScreen( br.GetPosition() ) );
|
||||
|
||||
|
||||
// Add half the bar height. We could use the actual bar height, but that would be confusing as a
|
||||
// bar removed at a place might not dock back there if just let go.
|
||||
pos += wxPoint( 0, 20 );
|
||||
|
||||
// Is mouse pointer within either dock?
|
||||
ToolDock *dock = NULL;
|
||||
if( tr.Contains( pos ) )
|
||||
@ -1043,6 +1048,7 @@ void ToolManager::OnMouse( wxMouseEvent & event )
|
||||
wxPoint p;
|
||||
wxRect r;
|
||||
|
||||
|
||||
// Calculate where the bar would be placed
|
||||
mDragBefore = dock->PositionBar( mDragBar, pos, r );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user