diff options
author | Andreas Oppebøen <andreas.oppeboen@gmail.com> | 2023-02-28 23:43:46 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-03-24 10:33:22 +0100 |
commit | c8547124e2ee4c2efb7421675ff38e209630044e (patch) | |
tree | 660b1117cff7c2d70c949f13bb80861f8b8ca1fb /Userland/Libraries/LibGUI/TreeViewModel.h | |
parent | 6a3e217c5c08db202b05710f247f4130ec625ec0 (diff) | |
download | serenity-c8547124e2ee4c2efb7421675ff38e209630044e.zip |
LibGUI: Fix slider so dragging handle left and right feels similar
When dragging the slider handle left/down, the handle would
snap to lower value with the slightest move of the mouse. When dragging
to the right/up however, it would take a lot more movement to cause
a change in value. This asymmetry made it feel really awkward to drag
the slider. It was caused by always rounding down using a cast to int.
By rounding to the nearest integer first, we ensure symmetric behavior.
Diffstat (limited to 'Userland/Libraries/LibGUI/TreeViewModel.h')
0 files changed, 0 insertions, 0 deletions