mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-05 22:28:57 +02:00
If mouse moves into ruler pushbuttons, do not show the quick play indicator.
This commit is contained in:
parent
8cfa9e217f
commit
31eda6641b
@ -2165,7 +2165,7 @@ void AdornedRulerPanel::OnMouseEvents(wxMouseEvent &evt)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool overButtons = GetButtonAreaRect().Contains(evt.GetPosition());
|
const bool overButtons = GetButtonAreaRect(true).Contains(evt.GetPosition());
|
||||||
const StatusChoice button = FindButton(evt.GetPosition());
|
const StatusChoice button = FindButton(evt.GetPosition());
|
||||||
const bool inScrubZone = !overButtons &&
|
const bool inScrubZone = !overButtons &&
|
||||||
// only if scrubbing is allowed now
|
// only if scrubbing is allowed now
|
||||||
@ -2822,13 +2822,19 @@ void AdornedRulerPanel::DoDrawPlayRegion(wxDC * dc)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wxRect AdornedRulerPanel::GetButtonAreaRect() const
|
wxRect AdornedRulerPanel::GetButtonAreaRect(bool includeBorder) const
|
||||||
{
|
{
|
||||||
auto x = LeftMargin, y = TopMargin;
|
int x, y, bottomMargin;
|
||||||
|
|
||||||
|
if(includeBorder)
|
||||||
|
x = 0, y = 0, bottomMargin = 0;
|
||||||
|
else
|
||||||
|
x = LeftMargin, y = TopMargin, bottomMargin = BottomMargin;
|
||||||
|
|
||||||
wxRect rect {
|
wxRect rect {
|
||||||
x, y,
|
x, y,
|
||||||
mProject->GetTrackPanel()->GetLeftOffset() - x,
|
mProject->GetTrackPanel()->GetLeftOffset() - x,
|
||||||
GetRulerHeight() - y - BottomMargin
|
GetRulerHeight() - y - bottomMargin
|
||||||
};
|
};
|
||||||
|
|
||||||
// Leave room for one digit on the ruler, so "0.0" is not obscured if you go to start.
|
// Leave room for one digit on the ruler, so "0.0" is not obscured if you go to start.
|
||||||
|
@ -367,7 +367,7 @@ private:
|
|||||||
void DrawQuickPlayIndicator(wxDC * dc /*NULL to DELETE old only*/);
|
void DrawQuickPlayIndicator(wxDC * dc /*NULL to DELETE old only*/);
|
||||||
void DoDrawPlayRegion(wxDC * dc);
|
void DoDrawPlayRegion(wxDC * dc);
|
||||||
|
|
||||||
wxRect GetButtonAreaRect() const;
|
wxRect GetButtonAreaRect(bool includeBorder = false) const;
|
||||||
|
|
||||||
struct ButtonStrings {
|
struct ButtonStrings {
|
||||||
wxString label, enable, disable;
|
wxString label, enable, disable;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user