Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: move slider seekranges & handle drawing into own functions #174

Merged
merged 1 commit into from
Nov 4, 2024
Merged

refactor: move slider seekranges & handle drawing into own functions #174

merged 1 commit into from
Nov 4, 2024

Conversation

Commander07
Copy link
Contributor

This PR aims to reduce code duplication and complexity by separating slider seekrange & handle drawing from the rest of the slider. As a result seekrange drawing is now the same on both the normal and persistent seekbar which closes #173.

Changes

  • Created draw_slider_handle function which takes an element its ass and draws a handle using settings provided by user_opts.
  • Created draw_slider_seekranges function which takes an element its ass and draws seekranges using settings provided by user_opts.
  • Changed both sliders and the persistent seekbar to use the new functions,

Preview

Persistent seekbar now respects user_opts.seekbar_cache_color
image

@Samillion
Copy link
Owner

Absolutely beautiful. I think at this point you've improved most of the seekrange behavior on ModernZ. Much appreciated.

@Samillion Samillion merged commit 27d0b13 into Samillion:main Nov 4, 2024
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.

seekbar cache color not applied to persistent buffer
2 participants