mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-11 22:27:42 +02:00
Center toolbar dock indicator triangles on edge of rectangle
This commit is contained in:
parent
64ad732aee
commit
203ddfd1a1
@ -1088,15 +1088,18 @@ void ToolManager::OnMouse( wxMouseEvent & event )
|
|||||||
// Decide which direction the arrow should point
|
// Decide which direction the arrow should point
|
||||||
if( r.GetTop() >= dr.GetHeight() )
|
if( r.GetTop() >= dr.GetHeight() )
|
||||||
{
|
{
|
||||||
p.x = dr.GetLeft() + ( dr.GetWidth() / 2 );
|
const auto &box = mDown->GetBox();
|
||||||
p.y = dr.GetBottom() - mDown->GetBox().GetHeight();
|
p.x = dr.GetLeft() + ( dr.GetWidth() / 2 )
|
||||||
|
- (box.GetWidth() / 2);
|
||||||
|
p.y = dr.GetBottom() - box.GetHeight();
|
||||||
mCurrent = mDown;
|
mCurrent = mDown;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
const auto &box = mLeft->GetBox();
|
||||||
p.x = dr.GetLeft() + r.GetLeft();
|
p.x = dr.GetLeft() + r.GetLeft();
|
||||||
p.y = dr.GetTop() + r.GetTop() + mLeft->GetBox().GetHeight() / 2;
|
p.y = dr.GetTop() + r.GetTop() +
|
||||||
//JKC ( ( r.GetHeight() - mLeft->GetBox().GetHeight() ) / 2 );
|
( ( r.GetHeight() - mLeft->GetBox().GetHeight() ) / 2 );
|
||||||
mCurrent = mLeft;
|
mCurrent = mLeft;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user