diff options
author | Marcus Nilsson <brainbomb@gmail.com> | 2021-07-19 11:42:53 +0200 |
---|---|---|
committer | Gunnar Beutner <gunnar@beutner.name> | 2021-07-19 16:24:06 +0200 |
commit | b57f7def1fe7edff95be3d0ecb136f30b58d3252 (patch) | |
tree | 0507d0ff8e5b9ecbcc58865271d8c840bf982bd8 /Userland/Libraries/LibGUI/Scrollbar.cpp | |
parent | 022966310268a26b5aea0394924894415520dc8c (diff) | |
download | serenity-b57f7def1fe7edff95be3d0ecb136f30b58d3252.zip |
LibGUI: Don't invalidate scrollbar rect if disabled
No need to repaint if it's not scrollable, this saves a tiny bit of
repaint :)
Diffstat (limited to 'Userland/Libraries/LibGUI/Scrollbar.cpp')
-rw-r--r-- | Userland/Libraries/LibGUI/Scrollbar.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGUI/Scrollbar.cpp b/Userland/Libraries/LibGUI/Scrollbar.cpp index 0b6017510a..f9da67dacb 100644 --- a/Userland/Libraries/LibGUI/Scrollbar.cpp +++ b/Userland/Libraries/LibGUI/Scrollbar.cpp @@ -327,6 +327,9 @@ Scrollbar::Component Scrollbar::component_at_position(const Gfx::IntPoint& posit void Scrollbar::mousemove_event(MouseEvent& event) { + if (!is_scrollable()) + return; + m_last_mouse_position = event.position(); auto old_hovered_component = m_hovered_component; |