Browse Source

Made Slider::getPositionOfValue() const

tags/2021-05-28
jules 10 years ago
parent
commit
f8047066d6
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      modules/juce_gui_basics/widgets/juce_Slider.cpp
  2. +1
    -1
      modules/juce_gui_basics/widgets/juce_Slider.h

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

@@ -1529,7 +1529,7 @@ bool Slider::isVertical() const noexcept { return pimpl->isVe
bool Slider::isRotary() const noexcept { return pimpl->isRotary(); }
bool Slider::isBar() const noexcept { return pimpl->isBar(); }
float Slider::getPositionOfValue (const double value) { return pimpl->getPositionOfValue (value); }
float Slider::getPositionOfValue (const double value) const { return pimpl->getPositionOfValue (value); }
//==============================================================================
void Slider::paint (Graphics& g) { pimpl->paint (g, getLookAndFeel()); }


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

@@ -726,7 +726,7 @@ public:
If the slider is rotary, this will throw an assertion and return 0. If the
value is out-of-range, it will be constrained to the length of the slider.
*/
float getPositionOfValue (double value);
float getPositionOfValue (double value) const;
//==============================================================================
/** This can be overridden to allow the slider to snap to user-definable values.


Loading…
Cancel
Save