mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-07 15:49:42 +02:00
Merge branch 'master' into scrubbing2
This commit is contained in:
commit
7fbae2a1aa
@ -61,7 +61,7 @@ void AboutDialog::CreateCreditsList()
|
||||
AddCredit(wxString(wxT("Greg Kozikowski, ")) + _("documentation and support"), roleTeamMember);
|
||||
AddCredit(wxString(wxT("Paul Licameli, ")) + _("developer"), roleTeamMember);
|
||||
AddCredit(wxString(wxT("Leland Lucius, ")) + _("developer"), roleTeamMember);
|
||||
AddCredit(wxString(wxT("Peter Sampson, ")) + _("documentation and support"), roleTeamMember);
|
||||
AddCredit(wxString(wxT("Peter Sampson")), roleTeamMember);
|
||||
AddCredit(wxString(wxT("Martyn Shaw, ")) + _("developer"), roleTeamMember);
|
||||
AddCredit(wxString(wxT("Bill Wharrie, ")) + _("documentation and support"), roleTeamMember);
|
||||
|
||||
|
@ -1015,6 +1015,25 @@ void TrackPanel::ScrollDuringDrag()
|
||||
mAutoScrolling = true;
|
||||
mListener->TP_ScrollLeft();
|
||||
}
|
||||
else {
|
||||
// Bug1387: enable autoscroll during drag, if the pointer is at either extreme x
|
||||
// coordinate of the screen, even if that is still within the track area.
|
||||
|
||||
int xx = mMouseMostRecentX, yy = 0;
|
||||
this->ClientToScreen(&xx, &yy);
|
||||
if (xx == 0) {
|
||||
mAutoScrolling = true;
|
||||
mListener->TP_ScrollLeft();
|
||||
}
|
||||
else {
|
||||
int width, height;
|
||||
::wxDisplaySize(&width, &height);
|
||||
if (xx == width - 1) {
|
||||
mAutoScrolling = true;
|
||||
mListener->TP_ScrollRight();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (mAutoScrolling) {
|
||||
// AS: To keep the selection working properly as we scroll,
|
||||
|
@ -467,6 +467,15 @@ void Meter::OnPaint(wxPaintEvent & WXUNUSED(event))
|
||||
// MixerTrackCluster style has no icon or L/R labels
|
||||
if (mStyle != MixerTrackCluster)
|
||||
{
|
||||
bool highlight = InIcon();
|
||||
if (highlight) {
|
||||
auto rect = mIconRect;
|
||||
rect.Inflate(gap, gap);
|
||||
wxColour colour(247, 247, 247);
|
||||
dc.SetBrush(colour);
|
||||
dc.SetPen(colour );
|
||||
dc.DrawRectangle(rect);
|
||||
}
|
||||
dc.DrawBitmap(*mIcon, mIconRect.GetPosition(), true);
|
||||
dc.SetFont(GetFont());
|
||||
dc.DrawText(mLeftText, mLeftTextPos.x, mLeftTextPos.y);
|
||||
@ -668,8 +677,22 @@ void Meter::OnSize(wxSizeEvent & WXUNUSED(event))
|
||||
mLayoutValid = false;
|
||||
}
|
||||
|
||||
bool Meter::InIcon(wxMouseEvent *pEvent) const
|
||||
{
|
||||
auto point = pEvent ? pEvent->GetPosition() : ScreenToClient(::wxGetMousePosition());
|
||||
return mIconRect.Contains(point);
|
||||
}
|
||||
|
||||
void Meter::OnMouse(wxMouseEvent &evt)
|
||||
{
|
||||
bool shouldHighlight = InIcon(&evt);
|
||||
if ((evt.GetEventType() == wxEVT_MOTION || evt.Entering() || evt.Leaving()) &&
|
||||
(mHighlighted != shouldHighlight)) {
|
||||
mHighlighted = shouldHighlight;
|
||||
mLayoutValid = false;
|
||||
Refresh();
|
||||
}
|
||||
|
||||
if (mStyle == MixerTrackCluster) // MixerTrackCluster style has no menu.
|
||||
return;
|
||||
|
||||
@ -688,7 +711,7 @@ void Meter::OnMouse(wxMouseEvent &evt)
|
||||
#endif
|
||||
|
||||
if (evt.RightDown() ||
|
||||
(evt.ButtonDown() && mIconRect.Contains(evt.m_x, evt.m_y)))
|
||||
(evt.ButtonDown() && InIcon(&evt)))
|
||||
{
|
||||
wxMenu menu;
|
||||
// Note: these should be kept in the same order as the enum
|
||||
|
@ -186,6 +186,7 @@ class Meter final : public wxPanel
|
||||
void OnErase(wxEraseEvent &evt);
|
||||
void OnPaint(wxPaintEvent &evt);
|
||||
void OnSize(wxSizeEvent &evt);
|
||||
bool InIcon(wxMouseEvent *pEvent = nullptr) const;
|
||||
void OnMouse(wxMouseEvent &evt);
|
||||
void OnKeyDown(wxKeyEvent &evt);
|
||||
void OnKeyUp(wxKeyEvent &evt);
|
||||
@ -280,6 +281,8 @@ class Meter final : public wxPanel
|
||||
|
||||
friend class MeterAx;
|
||||
|
||||
bool mHighlighted {};
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user