Skip to content

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

Merged
Samillion merged 1 commit intoSamillion:mainfrom
Commander07:main
Nov 4, 2024
Merged

refactor: move slider seekranges & handle drawing into own functions#174
Samillion merged 1 commit intoSamillion:mainfrom
Commander07:main

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