Skip to content

fix(ui): keyboard-step a fractional slider by its declared step, not 1/precision - #1082

Merged
marcinz606 merged 1 commit into
marcinz606:mainfrom
PabloRuizCuevas:fix/slider-keyboard-step-precision
Sep 12, 2026
Merged

marcinz606 merged 1 commit into
marcinz606:mainfrom
PabloRuizCuevas:fix/slider-keyboard-step-precision

Conversation

@PabloRuizCuevas

@PabloRuizCuevas PabloRuizCuevas commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Slider that rotates the images (and others) are basically unusable by using the keyboard as the keyboard steps is super small, this pr changes that.

from the AI:

CompactSlider's own arrow-key step lives in the slider's internal precision-scaled integer space, but only ever got set when step >= 1.0 — using int(step) as the raw integer value directly, which is only correct at precision=1. Every fractional-precision slider with an explicit step (lith/cyanotype exposure, burn, feather, hue trim, render exposure…) had that step silently ignored by the slider widget itself, which fell back to Qt's raw default of 1 internal unit — 1/precision in real units, invisible on a wide range. Grade, at precision=100 with step=1.0, moved 0.01 ISO-R points per arrow press instead of the declared 1.0.

Fixed by always scaling step through precision for the slider's own singleStep, independent of the >= 1.0 branch (which stays for tick spacing and integer display).

Also gives Fine Rotation, Tilt and Swing an explicit step=0.1 (was the default 0.01, which happened to match Qt's old fallback exactly, so the wiring fix alone would not have changed anything for them) — an arrow press on any of the three was imperceptible on a ±45°/±15% range.

…1/precision

CompactSlider's own arrow-key step lives in the slider's internal
precision-scaled integer space, but only ever got set when step >= 1.0 --
using int(step) as the raw integer value, correct only at precision=1. Every
fractional-precision slider with an explicit step (lith/cyanotype exposure,
burn, feather, hue trim, render exposure...) had that step silently ignored
by the slider widget, which fell back to Qt's raw default of 1 internal unit
-- 1/precision in real units, invisible on a wide range. Grade, at
precision=100 with step=1.0, moved 0.01 ISO-R points per arrow press instead
of the declared 1.0.

Fixed by always scaling step through precision for the slider's own
singleStep, independent of the >=1.0 branch (which stays for tick spacing
and integer display).

Also gives Fine Rotation, Tilt and Swing an explicit step=0.1 (was the
default 0.01, which happened to match Qt's old fallback exactly, so the
wiring fix alone would not have changed anything for them) -- an arrow press
on any of the three was imperceptible on a ±45 degree / ±15% range.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@marcinz606
marcinz606 merged commit f01b590 into marcinz606:main Sep 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants