Skip to content

fix(qt): unbounded slider mode, softer panel and retargetable animations - #54

Merged
otto-link merged 3 commits into
devfrom
feat/industrial-polish
Sep 6, 2026
Merged

fix(qt): unbounded slider mode, softer panel and retargetable animations#54
otto-link merged 3 commits into
devfrom
feat/industrial-polish

Conversation

@Leonhardmaster2

Copy link
Copy Markdown
Contributor

follow up on #52. three things, all in the industrial design.

first one is the important bit. #52 made the sliders decline ranges bounded by
FLT_MAX / INT_MAX and fall back to stock, which was the right call for the drag
but it turned out to hit 197 rows and 86 of those are Seed, so basically every
node ended up with a stock row sitting near the top. so instead of declining
them the sliders have their own unbounded mode now. thumb sits in the middle,
follows the cursor while you drag, slides back to the middle when you let go,
and the value moves by how far you dragged instead of where the cursor is. i
took the rates straight from stock SliderFloat/SliderInt so it should feel the
same as it did, 200px per unit for floats and 4px per step for ints, ctrl for
fine and shift for coarse.

second is just rounding and text. corners were too hard so radius went 2 -> 4,
rail 1 -> 3, card 6 -> 10. the header wasnt rounding its own corners at all and
its opaque and sits on top of the card, so it was squaring off the top two
while the body rounded the bottom two, which is why the sections looked a bit
off. labels are 13px medium now instead of 12px normal and the ink sits closer
to white, on both the reference colourway and the palette derived one.

third, the section reveal and the combo popup both restarted their animation
from an endpoint, so toggling one while it was still moving jumped it to full
height (or to zero) before easing off again. both retarget from wherever they
are now. the section header also had a stylesheet min-height, which doesnt
actually raise the minimum the layout honours, so it was getting squeezed
during the animation and the title visibly crept up. its a real fixed height
now.

theres tests for the animation side, section geometry gets checked on every
paint through a run of fast toggles at three viewport widths, and the popup
across 16 open and dismiss scenarios. both pass here.

happy to split this in two if youd rather look at the slider change on its own,
the first commit is self contained.

The industrial sliders used to decline a range bounded by FLT_MAX or
INT_MAX and let the row fall through to stock. That fixed a real bug, a
rail cannot represent a range with no limits, but it hit 197 rows and 86
of those are Seed, which sits near the top of nearly every node. So most
panels ended up with a stock row among the industrial ones.

They now handle those rows themselves. The thumb rests at the centre of
the rail, follows the cursor while dragging and eases back to centre on
release, and the value moves by how far you dragged rather than by where
the cursor is. Rates match stock so a row feels the same either way, 200
pixels per unit for float and 4 pixels per step for int, with ctrl fine
and shift coarse. There is no fill, since there is no proportion to
fill, and a centre tick marks the rest position while a drag is running.

Measuring from the value at the press rather than accumulating per event
means a drag out and back lands exactly where it started. Int rows widen
to 64 bits before clamping, because Seed lives in [0, INT_MAX] and the
arithmetic would otherwise overflow near the top of it.

can_render still requires both constraint keys, it just no longer
screens their values.
…able

Rounding and text first. Corners were too hard throughout, so the shared
radius goes 2 to 4, the rail 1 to 3 and the section card 6 to 10, and the
scrollbar handle reads its radius from the metrics instead of hardcoding
one. The section header now rounds its own corners to the card radius,
all four when collapsed and the top pair when expanded, because it is
opaque and sits on top of the card, so any corner it did not round it
squared off again. That is why the top of a section looked nothing like
the bottom.

Row labels go from 12px to 13px and from normal to medium weight, and
every ink step sits closer to the text colour, on both the reference
colourway and the palette derived one. At the old contrast a label leaned
on antialiasing to form its stems and the panel read as small grey print
next to the rest of the app.

Then the animations. Both the section reveal and the combo popup
restarted from an endpoint instead of from where they currently were, so
toggling one while it was still moving jumped it to full height or to
zero before easing off again. Both retarget from the current value now.
The section header also gets a real fixed height rather than a
stylesheet min-height, which does not raise the minimum the layout
honours, so the header was one of the things that got squeezed while a
section animated and its title visibly crept upward.

Two tests cover it: section geometry is asserted every paint through a
run of fast toggles at three viewport widths, and the popup across 16
open and dismiss scenarios.
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