Skip to content

NSSliderCell: break tick ties towards the lower tick#478

Open
DTW-Thalion wants to merge 1 commit into
gnustep:masterfrom
DTW-Thalion:fix/nsslidercell-tick-rounding
Open

NSSliderCell: break tick ties towards the lower tick#478
DTW-Thalion wants to merge 1 commit into
gnustep:masterfrom
DTW-Thalion:fix/nsslidercell-tick-rounding

Conversation

@DTW-Thalion

Copy link
Copy Markdown
Contributor

-[NSSliderCell closestTickMarkValueToValue:] snapped exact halves to
the upper tick (2.5 -> 3 with integer ticks over 0..10). OS X breaks
ties towards the lower tick (2.5 -> 2, 7.5 -> 7). Snap ties down to
match, leaving GSRoundTowardsInfinity (shared with other classes)
untouched. Verified on a macOS runner.

Adds a test for the tie rounding.

@DTW-Thalion DTW-Thalion requested a review from fredkiefer as a code owner July 12, 2026 13:52
@DTW-Thalion DTW-Thalion force-pushed the fix/nsslidercell-tick-rounding branch 3 times, most recently from 5d611b2 to bc2896d Compare July 12, 2026 20:41
closestTickMarkValueToValue: rounded exact halves up (2.5 to 3 with
integer ticks); OS X rounds them down (2.5 to 2, 7.5 to 7).  Snap ties
towards the lower tick to match.
@DTW-Thalion DTW-Thalion force-pushed the fix/nsslidercell-tick-rounding branch from bc2896d to d37ae95 Compare July 12, 2026 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant