mirror of
https://github.com/cookiengineer/audacity
synced 2025-09-16 16:20:50 +02:00
Bug1201: Be sure tool tips show for toolbar grabbers and resizers
This commit is contained in:
parent
9d506cd850
commit
21ea9a5ead
@ -78,7 +78,6 @@ private:
|
|||||||
void OnLeftDown(wxMouseEvent & event);
|
void OnLeftDown(wxMouseEvent & event);
|
||||||
void OnLeftUp(wxMouseEvent & event);
|
void OnLeftUp(wxMouseEvent & event);
|
||||||
void OnEnter(wxMouseEvent & event);
|
void OnEnter(wxMouseEvent & event);
|
||||||
void OnLeave(wxMouseEvent & event);
|
|
||||||
void OnMotion(wxMouseEvent & event);
|
void OnMotion(wxMouseEvent & event);
|
||||||
void ResizeBar(const wxSize &size);
|
void ResizeBar(const wxSize &size);
|
||||||
void OnCaptureLost(wxMouseCaptureLostEvent & event);
|
void OnCaptureLost(wxMouseCaptureLostEvent & event);
|
||||||
@ -100,6 +99,7 @@ BEGIN_EVENT_TABLE( ToolBarResizer, wxWindow )
|
|||||||
EVT_PAINT( ToolBarResizer::OnPaint )
|
EVT_PAINT( ToolBarResizer::OnPaint )
|
||||||
EVT_LEFT_DOWN( ToolBarResizer::OnLeftDown )
|
EVT_LEFT_DOWN( ToolBarResizer::OnLeftDown )
|
||||||
EVT_LEFT_UP( ToolBarResizer::OnLeftUp )
|
EVT_LEFT_UP( ToolBarResizer::OnLeftUp )
|
||||||
|
EVT_ENTER_WINDOW( ToolBarResizer::OnEnter )
|
||||||
EVT_MOTION( ToolBarResizer::OnMotion )
|
EVT_MOTION( ToolBarResizer::OnMotion )
|
||||||
EVT_MOUSE_CAPTURE_LOST( ToolBarResizer::OnCaptureLost )
|
EVT_MOUSE_CAPTURE_LOST( ToolBarResizer::OnCaptureLost )
|
||||||
EVT_KEY_DOWN( ToolBarResizer::OnKeyDown )
|
EVT_KEY_DOWN( ToolBarResizer::OnKeyDown )
|
||||||
@ -178,6 +178,15 @@ void ToolBarResizer::OnLeftUp( wxMouseEvent & event )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ToolBarResizer::OnEnter( wxMouseEvent & event )
|
||||||
|
{
|
||||||
|
// Bug 1201: On Mac, unsetting and re-setting the tooltip may be needed
|
||||||
|
// to make it pop up when we want it.
|
||||||
|
const auto text = GetToolTipText();
|
||||||
|
UnsetToolTip();
|
||||||
|
SetToolTip(text);
|
||||||
|
}
|
||||||
|
|
||||||
void ToolBarResizer::OnMotion( wxMouseEvent & event )
|
void ToolBarResizer::OnMotion( wxMouseEvent & event )
|
||||||
{
|
{
|
||||||
// Go ahead and set the event to propagate
|
// Go ahead and set the event to propagate
|
||||||
|
@ -384,6 +384,8 @@ void AButton::OnMouseEvent(wxMouseEvent & event)
|
|||||||
AButtonState prevState = GetState();
|
AButtonState prevState = GetState();
|
||||||
|
|
||||||
if (event.Entering()) {
|
if (event.Entering()) {
|
||||||
|
// Bug 1201: On Mac, unsetting and re-setting the tooltip may be needed
|
||||||
|
// to make it pop up when we want it.
|
||||||
auto text = GetToolTipText();
|
auto text = GetToolTipText();
|
||||||
UnsetToolTip();
|
UnsetToolTip();
|
||||||
SetToolTip(text);
|
SetToolTip(text);
|
||||||
|
@ -201,6 +201,12 @@ void Grabber::OnLeftDown(wxMouseEvent & event)
|
|||||||
//
|
//
|
||||||
void Grabber::OnEnter(wxMouseEvent & WXUNUSED(event))
|
void Grabber::OnEnter(wxMouseEvent & WXUNUSED(event))
|
||||||
{
|
{
|
||||||
|
// Bug 1201: On Mac, unsetting and re-setting the tooltip may be needed
|
||||||
|
// to make it pop up when we want it.
|
||||||
|
const auto text = GetToolTipText();
|
||||||
|
UnsetToolTip();
|
||||||
|
SetToolTip(text);
|
||||||
|
|
||||||
// Redraw highlighted
|
// Redraw highlighted
|
||||||
mOver = true;
|
mOver = true;
|
||||||
Refresh(false);
|
Refresh(false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user