Skip to content

Commit

Permalink
Move spacer between cover art and track info to flex row (#432)
Browse files Browse the repository at this point in the history
  • Loading branch information
SeaSpr authored Jul 26, 2023
1 parent c839fab commit 67ec1b4
Showing 1 changed file with 23 additions and 19 deletions.
42 changes: 23 additions & 19 deletions psst-gui/src/ui/playback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,26 +89,30 @@ fn playing_item_widget() -> impl Widget<NowPlaying> {

Flex::row()
.with_child(cover_art)
.with_spacer(theme::grid(2.0))
.with_flex_child(
Flex::column()
.cross_axis_alignment(CrossAxisAlignment::Start)
.with_child(name)
.with_spacer(2.0)
.with_child(detail)
.with_spacer(2.0)
.with_child(origin)
.on_click(|ctx, now_playing, _| {
ctx.submit_command(cmd::NAVIGATE.with(now_playing.origin.to_nav()));
})
.context_menu(|now_playing| match &now_playing.item {
Playable::Track(track) => {
track::track_menu(track, &now_playing.library, &now_playing.origin)
}
Playable::Episode(episode) => {
episode::episode_menu(episode, &now_playing.library)
}
}),
Flex::row()
.with_spacer(theme::grid(2.0))
.with_flex_child(
Flex::column()
.cross_axis_alignment(CrossAxisAlignment::Start)
.with_child(name)
.with_spacer(2.0)
.with_child(detail)
.with_spacer(2.0)
.with_child(origin)
.on_click(|ctx, now_playing, _| {
ctx.submit_command(cmd::NAVIGATE.with(now_playing.origin.to_nav()));
})
.context_menu(|now_playing| match &now_playing.item {
Playable::Track(track) => {
track::track_menu(track, &now_playing.library, &now_playing.origin)
}
Playable::Episode(episode) => {
episode::episode_menu(episode, &now_playing.library)
}
}),
1.0
),
1.0,
)
.with_child(ViewSwitcher::new(
Expand Down

0 comments on commit 67ec1b4

Please sign in to comment.