Browse Source

Handle HoverScroll only if scrollbars are visible.

tags/v1.0.0
Andrew Belt 5 years ago
parent
commit
79f0fd7ed3
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      src/ui/ScrollWidget.cpp

+ 4
- 0
src/ui/ScrollWidget.cpp View File

@@ -96,6 +96,10 @@ void ScrollWidget::onHoverScroll(const event::HoverScroll &e) {
if (e.isConsumed())
return;

// Scroll only if the scrollbars are visible
if (!(horizontalScrollBar->visible || verticalScrollBar->visible))
return;

math::Vec scrollDelta = e.scrollDelta;
// Flip coordinates if shift is held
if ((APP->window->getMods() & WINDOW_MOD_MASK) == GLFW_MOD_SHIFT)


Loading…
Cancel
Save