summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/Button.h
diff options
context:
space:
mode:
authorAndreas Oppebøen <andreas.oppeboen@gmail.com>2023-03-01 21:18:10 +0100
committerAndreas Kling <kling@serenityos.org>2023-03-24 10:33:22 +0100
commit0e4586dd3ec6ed7847b65d34ead93e64d5cb3bf2 (patch)
treef3049edf43c50b8e1815305f56d0c8d9087a755d /Userland/Libraries/LibGUI/Button.h
parenta30b341a2ca6cb13d88886dfe7c19a7fabd598b8 (diff)
downloadserenity-0e4586dd3ec6ed7847b65d34ead93e64d5cb3bf2.zip
LibGUI: Fix slightly wrong value slider knob position
When clicking the value slider bar, the knob was not positioned as close to the mouse as expected. When moving the mouse right, the knob would lag a bit behind, and the cursor would eventually be outside the knob. The bug was due to knob_rect() taking knob_thickness into account to prevent the knob from protruding outside the bar. The value_at(pos) calculated the relative position based on the entire width of the bar. This discrepancy is fixed by taking knob_thickness into account in value_at(position).
Diffstat (limited to 'Userland/Libraries/LibGUI/Button.h')
0 files changed, 0 insertions, 0 deletions