-
Notifications
You must be signed in to change notification settings - Fork 89
feat(volume): add marquee effect to popup #1066
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
feat(volume): add marquee effect to popup #1066
Conversation
|
Draft but tips/guidance is quite welcome if there is any |
48d6a77 to
3709ba1
Compare
Now they all scroll correctly
also extract logic into a top-level function
Dynamically decide if scrolling is necessary based on allocated width change. There's still an edge case where if `min-width` is set via GTK Inspector, labels would stop scrolling but positions would be off before a mouse hover or a popup visibility toggle event. This is minor and doesn't impact the UI much.
Hardcoded 5 seconds pause after animation cycle
Match `TruncateMode` better
270e834 to
9841de0
Compare
|
Functionality-wise it's basically ready and works really well for me, I'll just try to polish the code a bit more before the review. Edit: * "traditional methods" being: PolicyType::External let scrolled = ScrolledWindow::builder()
.vscrollbar_policy(gtk::PolicyType::Never)
.hscrollbar_policy(gtk::PolicyType::External)
.build();.hide() if let Some(hbar) = scrolled.hscrollbar() {
hbar.hide(); // or hbar.set_visible(false)
}This in particular also generally breaks scrolling when GTK phocus theme is used. |
|
Just a thought if you're still struggling with this. A radically different approach, but it would probably be relatively trivial to use Cairo and Pango for this. You could draw text onto a "label" canvas and just translate the text coords. |
|
Thank you for the suggestion. I'll try this approach next, though definitely not anytime soon as I'll be busy for a while, so if anyone wants to pick this up that'd be welcome. Alternatively, we could just wait for the GTK4 port to be completed, and maybe GTK4 would have a more sensible behavior wrt to that one last issue of hiding the scrollbar in a theming-independent way and without causing slowdown on mouse movement. |
|
Superseded by #1250. GTK4 actually fixes that scrollbars bug, so pretty much no changes aside from updating to GTK4 and expanding what's configurable. |
Part of #1011