1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-06 23:29:24 +02:00

No TrackPanel tooltips for now, may later reenable selected ones...

... perhaps for the TCP buttons, to make their behavior consistent with toolbar
buttons.
This commit is contained in:
Paul Licameli 2017-07-15 20:50:34 -04:00
parent e55393af69
commit 5644bed8bd
2 changed files with 11 additions and 7 deletions

View File

@ -21,12 +21,14 @@ struct HitTestPreview
HitTestPreview()
{}
HitTestPreview(const wxString &message_, wxCursor *cursor_)
: message(message_), cursor(cursor_)
HitTestPreview(const wxString &message_, wxCursor *cursor_,
const wxString &tooltip_ = {})
: message(message_), cursor(cursor_), tooltip(tooltip_)
{}
wxString message {};
wxCursor *cursor {};
wxString tooltip{};
};
#endif

View File

@ -901,7 +901,7 @@ void TrackPanel::HandleMotion
newTrack = static_cast<CommonTrackPanelCell*>( newCell.get() )->
FindTrack();
wxString tip{};
wxString status{}, tooltip{};
wxCursor *pCursor{};
unsigned refreshCode = 0;
@ -974,7 +974,8 @@ void TrackPanel::HandleMotion
// Update status message and cursor, whether dragging or not
if (handle) {
auto preview = handle->Preview( tpmState, GetProject() );
tip = preview.message;
status = preview.message;
tooltip = preview.tooltip;
pCursor = preview.cursor;
auto code = handle->GetChangeHighlight();
handle->SetChangeHighlight(RefreshCode::RefreshNone);
@ -988,9 +989,10 @@ void TrackPanel::HandleMotion
if (HasEscape())
/* i18n-hint TAB is a key on the keyboard */
tip += wxT(" "), tip += _("(Esc to cancel)");
this->SetToolTip(tip);
mListener->TP_DisplayStatusMessage(tip);
status += wxT(" "), status += _("(Esc to cancel)");
mListener->TP_DisplayStatusMessage(status);
if (!tooltip.empty())
this->SetToolTip(tooltip);
if (pCursor)
SetCursor( *pCursor );