1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-15 09:01:12 +01:00

Bug 625 - Track Pan / Gain sliders don't show tool tip on hover

This commit is contained in:
Leland Lucius
2020-03-09 11:06:07 -05:00
parent 046ee21e72
commit a7bd7331ac
8 changed files with 113 additions and 14 deletions

View File

@@ -83,6 +83,8 @@ struct CellularPanel::State
std::vector<UIHandlePtr> mTargets;
size_t mTarget {};
unsigned mMouseOverUpdateFlags{};
wxString mToolTip;
int mMouseMostRecentX;
int mMouseMostRecentY;
@@ -373,10 +375,11 @@ void CellularPanel::HandleMotion
UpdateStatusMessage(status);
#if wxUSE_TOOLTIPS
if (tooltip.Translation() != GetToolTipText()) {
if (tooltip.Translation() != state.mToolTip) {
// Unset first, by analogy with AButton
UnsetToolTip();
SetToolTip(tooltip);
state.mToolTip = tooltip.Translation();
}
#endif
@@ -815,8 +818,12 @@ catch( ... )
void CellularPanel::HandleClick( const TrackPanelMouseEvent &tpmEvent )
{
auto pCell = tpmEvent.pCell;
#if wxUSE_TOOLTIPS
// Any click should cancel the tooltip
UnsetToolTip();
#endif
auto pCell = tpmEvent.pCell;
// Do hit test once more, in case the button really pressed was not the
// one "anticipated."
{