-
Notifications
You must be signed in to change notification settings - Fork 815
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
Add a marquee widget #2917
Comments
For reference, here is what a marquee looks like... Screen.Recording.2023-07-12.at.09.50.26.mov |
I'll have a look at this. |
Hey @tonteg, are you still working on this or did you drop it? |
Hi, I temporarily put this aside, but I'd definitely like to finish it. I'll try to get it ready for a PR in the next two weeks. |
Sure thing, @tonteg . Looking forward to your PR. |
Closing for now, but if there is a PR somewhere I'd be happy to take a look! |
Don't forget to star the repository! Follow @textualizeio for Textual updates. |
(This issue is reserved for the EuroPython 2023 sprint. If you are not participating in the sprint, please refrain from working on this issue. Thanks!)
This issue concerns itself with adding a new widget to Textual.
The marquee widget should be similar to HTML marquees (scroll down to the examples in this page to see what the HTML marquee was).
The widget should have a reactive attribute that holds the string or the
rich.text.Text
instance that should be rotated endlessly.You'll probably want to take a look at timers / the attribute
auto_refresh
to enable the marquee animation.You will want to implement a method
render
that is responsible for returning the “frames” of your marquee widget.You may also look at
_progress_bar.py::Bar.render
and_progress_bar.py::Bar.render_indeterminate
for some inspiration on how to implement a cyclical animation.After you are done with the implementation, consider adding a reactive attribute that controls the speed of the animation.
Take a look at #2333 to see what files need to be changed when you implement a new widget.
Then, don't be like me and also do the final step shown in #2399 to add your new widget to the widget gallery.
Good luck and have fun!
The text was updated successfully, but these errors were encountered: