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

Custom chapter size #119

Closed
wants to merge 1 commit into from
Closed

Conversation

po5
Copy link
Contributor

@po5 po5 commented Aug 20, 2022

Lets the user customize the width of chapter markers.
Also handles the case of not overlapping chapters that are very close together (in timeline_chapters=lines style, dots can still overlap).

@tomasklaen
Copy link
Owner

Set the default timeline_chapters_width to 6. Then split the current chapter_size variable into chapter_width and chapter_height, and determine their values in the if/else switch above the rendering. For example for dots:

- chapter_size = math.min(6, (foreground_size / 2) + 1)
+ chapter_width = math.min(options.timeline_chapters_width, (foreground_size / 2) + 1)

Then use them in rendering.

And remove the overlapping prevention. It's valuable to have a visual cue that there are multiple chapters on top of each other, otherwise it'll look like a chapter range bar.

@tomasklaen
Copy link
Owner

Sorry I've touched the whole code block with chapters in last commit, you'll have to rebase 😯.

@tomasklaen
Copy link
Owner

Had a bit of time and wanted to include this in the next release, so I went ahead.

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