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

Allow specifying the maximum song title length before scrolling begins in spotify-widget #366

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

chaorace
Copy link
Contributor

Allows specifying a max title length via a new title_scroll_length option before spotify-widget begins scrolling it. If -1 is specified, the widget will never scroll (this is also how the pre-existing max_length configuration option works works). The originally hardcoded maximum scroll area width has been retained as the default option value.

Note that only the song title is ever scrolled by the widget (this is the pre-existing behavior) and so only the length of the title will count towards the scroll area length.

chaorace added 3 commits July 13, 2022 16:08
Allows specifying a max title length before the widget begins to scroll it
If -1 is specified, the widget will never scroll (similar to max_length)

Note that ONLY the song title will ever scroll and so the maximum length
is only in respect to the song length, not the overall content length.
(this is the pre-existing behavior which has not been touched in this PR)
Allows specifying the max length before song titles begin scrolling via
widget config. Much like with the max_length config option, a value of
-1 will be uncapped.
Fixed up a spelling error and documented the -1 behavior.
The -1 behavior is obviously intended, because it was already demonstrated
in one of the examples.
@streetturtle
Copy link
Owner

This looks cool! Thanks! I would like to test it for some time (I'm not 100% sure about using scrollable widget, as there was some note in docs about how resource-greedy it might be - not sure, though, if it's still the case if widget does not scroll)

@chaorace
Copy link
Contributor Author

@streetturtle The widget already scrolls, though. I actually introduced this PR specifically because I hated the scrolling and wanted a way to turn it off

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