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
Update lists, visually merge album header #402
Conversation
I think I preferred the color scheme in your original mockup (darker header, lighter list) TIL about AdwScrollableClamp, nice! is the ScrollableWindow needed at all in that case? |
I guess we could use AdwApplication - it provides separate css for free, more or less. |
Also, there has to be some sorta transition between header header and headerbar header. |
what kind of transition are you thinking of, is it about having the title appear in the headerbar?
I'll have a look, not sure what this allows! don't worry too much about the bg color otherwise, if you like it that way I think I can live with it :D |
One more thing - I want to make the entire header area draggable, but that conflicts with the swipe tracker - clicking on the header area immideately makes it collapse. Anything that could be done about that? Is it fine to have the swipe gesture be touch-only? |
Clicking should not make it collapse, it should not identify a simple click as a swipe so there could be a small issue here, but yes, absolutely we could make it touch only! I am not sure how that would work with a GtkWindowHandle which I assume you´d want here? |
Actually I'm saying we can make it touch only but I can't remember how at the moment... I think there was a flag for that in gtk3... |
Yeah, pardon, it doesn't indeed - I meant it collapses on drag. |
Oh yeah okay checked out your branch (looking good!!) and I see what you mean :/ not sure how to work around that! Except to make it touch only indeed |
Well set_touch_only seems to do the trick :D |
(diff for reference) --- a/src/app/components/details/details.rs
+++ b/src/app/components/details/details.rs
@@ -97,9 +97,11 @@ impl AlbumDetailsWidget {
);
let swipe_controller = gtk::GestureSwipe::new();
+ swipe_controller.set_touch_only(true);
swipe_controller.set_propagation_phase(gtk::PropagationPhase::Capture);
swipe_controller.connect_swipe(clone!(@weak self as _self => move |_, _, dy| {
- _self.set_header_visible(dy >= 0f64);
+ _self.set_header_visible(dy > -0.1);
}));
self.widget() I see you're still making changes to the style, just give me a heads up when you want to merge things:) |
Have unpushed commits and several other nitpicks and also not at home, so making a draft |
Perfect 👍 |
Alright, outside of the headerbar transition, I'm happy with this now. |
I have one or two things I need to do with headerbars anyway, maybe I could help! what did you have in mind again? Have the album title appear in the header when scrolling is that right? |
Removing .flat and showing the title when the header is hidden, yeah |
https://github.com/xou816/spot/compare/listing-headerbar here is an update for that! I should not have made this Screen-wrapper thing but long story short, should be easier to use our selection-enabled headerbars now if that looks okay to you I'll push to your branch! not so sure how to make the css transition good but it's a start |
@@ -87,7 +87,7 @@ impl AlbumDetailsWidget { | |||
let is_up_to_date = widget.header_revealer.reveals_child() == visible; | |||
if !is_up_to_date { | |||
widget.header_revealer.set_reveal_child(visible); | |||
widget.headerbar.set_title_visible(!visible); | |||
widget.headerbar.set_title_visible(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
think the line can be removed altogether as well as the property in the ui file if we're using opacity now :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this is a dirty hack - title was invisible if not explicitly set visible somehow.
Not sure why it doesn't - I removed the border from the main headerbar as to not interfere with the clamp's but it shouldn't affect selection mode? |
Yeah, I'm not touching its box-shadow at all, it just doesn't get rendered for some reason |
ah well, we'll figure this out later! thank you so much, those screens you've been working on look so much better than the others!! think it might be time to release a new version on master too, if its compatible with the currently released runtime! |
One thing about the previous MR is that .card applies to the entire ListView, including stuff like rounded corners. Herein, I try to recreate the .boxed-list style, applying the style to individual rows.
In practice, this means that the scrollbar is where it's supposed to be while technically being under ListView ∈ ScrolledWindow rule.
Make header revealing/collapsing feel more intentional.
Resolves #379