Skip to content

Commit d3c6608

Browse files
committed
- fix the scroll issue on abstract slider, where it could scroll, even if it has no focus
1 parent 5a106e7 commit d3c6608

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/ui/components/abstract_slider.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ namespace ui {
168168
handled = true;
169169
}
170170

171-
} else if (event.type == SDL_MOUSEWHEEL) {
171+
} else if (event.type == SDL_MOUSEWHEEL && has_focus()) {
172172

173173
// here we use a reverse scroll behaviour, since moving the mouse up is always considered increasing the volume, regardless of you OS setting about natural scrolling or not
174174
const bool direction_is_up =

src/ui/components/color_picker.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
namespace detail {
1515

1616
// it is intended, that this never has focus, than the scroll wheel doesn't work, but it shouldn't work, since scrolling a color slider isn't intended behaviour
17-
//TODO: it can scroll, fix that !
1817
struct ColorSlider : public ui::AbstractSlider<double> {
1918
private:
2019
Texture m_texture;

0 commit comments

Comments
 (0)