Skip to content

Rework slider - #55

Open
JoeZiminski wants to merge 10 commits into
mainfrom
rework-slider
Open

Rework slider#55
JoeZiminski wants to merge 10 commits into
mainfrom
rework-slider

Conversation

@JoeZiminski

@JoeZiminski JoeZiminski commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

(branched from #54, requires that to be merged before this)

Currently, the slider value is based on the window chunk size. For larger window sizes, this can create strange behaviour e.g. a 5s window on a 25s recording means there are only 5 valid values on the slider.

This PR reconfigures how the slider works by breaking it up into 2**31-1 values, as Qt has an int32 cutoff on the C++ side. Given these values, the corresponding sample number is mapped through simple scaling round(slider value / slider max-value * num_samples)

There is now a new limit on how far the slider can be moved to the right - it will stop when it is 1-window size away from the end.

Currently, the slider position sets the first value of the window, but the lineedit sets the centre-value. Is it worth aligning these so the input time to the lineedit sets the first value of the window, rather than the centre? I don't feel strongly on this, though it creates one confusing behaviour that when the slider moves the lineedit indicates the first sample of the window. but if 'enter' is pressed on the lineedit, it then jumps such that the value is the centre value of the window.

@JoeZiminski
JoeZiminski changed the base branch from main to si-times July 30, 2026 11:48
@JoeZiminski
JoeZiminski marked this pull request as ready for review July 30, 2026 13:20
@JoeZiminski JoeZiminski mentioned this pull request Jul 30, 2026
Base automatically changed from si-times to main August 8, 2026 02:37
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.

1 participant