Browse Source

Added an option to pass -1 as the hoverTimeout parameter of Slider::setPopupDisplayEnabled() to cause the popup to remain until a mouseExit() and added some documentation

tags/2021-05-28
ed 8 years ago
parent
commit
c550c81874
2 changed files with 5 additions and 1 deletions
  1. +1
    -1
      modules/juce_gui_basics/widgets/juce_Slider.cpp
  2. +4
    -0
      modules/juce_gui_basics/widgets/juce_Slider.h

+ 1
- 1
modules/juce_gui_basics/widgets/juce_Slider.cpp View File

@@ -965,7 +965,7 @@ public:
if (popupDisplay == nullptr)
showPopupDisplay();
if (popupDisplay != nullptr)
if (popupDisplay != nullptr && popupHoverTimeout != -1)
popupDisplay->startTimer (popupHoverTimeout);
}
}


+ 4
- 0
modules/juce_gui_basics/widgets/juce_Slider.h View File

@@ -626,6 +626,10 @@ public:
pass nullptr, the pop-up will be placed on the desktop instead (note that it's a
transparent window, so if you're using an OS that can't do transparent windows
you'll have to add it to a parent component instead).
By default the popup display shown when hovering will remain visible for 2 seconds,
but it is possible to change this by passing a different hoverTimeout value. A
value of -1 will cause the popup to remain until a mouseExit() occurs on the slider.
*/
void setPopupDisplayEnabled (bool shouldShowOnMouseDrag,
bool shouldShowOnMouseHover,


Loading…
Cancel
Save