style(music): center the transport controls on the player bar

The transport buttons were pushed to the far right because the
now-playing label had width(Fill). Regroup the bar into three sections
— left(Fill) identity+label, centered transport, right(Fill) position +
expand — so the controls sit in the middle. Pure widget regrouping; no
message, config, or behavior change.

Implemented by Codex (gpt-5.5), reviewed + gates re-run by Claude.

Co-Authored-By: Codex <codex@openai.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-28 17:07:59 -04:00
co-authored by Codex Claude Opus 4.8
parent b553a94875
commit d155091eed
+47 -29
View File
@@ -5729,35 +5729,53 @@ fn view(state: &AppState) -> Element<'_, AppMessage> {
.unwrap_or_else(|| "--:--".to_string()); .unwrap_or_else(|| "--:--".to_string());
let player_bar = container( let player_bar = container(
row![ row![
text("").size(18).color(color_blue), container(
text(now_playing_label(listening_peer_name, current_track_name)) row![
.size(13) text("").size(18).color(color_blue),
.color(color_text) text(now_playing_label(listening_peer_name, current_track_name))
.width(iced::Length::Fill), .size(13)
button(text("").size(13)) .color(color_text),
.on_press(AppMessage::MusicPrev) ]
.style(b_style(color_surface, color_blue, color_text, 6.0)) .spacing(8)
.padding(7), .align_y(iced::alignment::Vertical::Center)
button(text(music_bar_play_label).size(13)) )
.on_press(AppMessage::MusicPlayPause) .width(iced::Length::Fill),
.style(b_style(color_blue, color_lavender, color_crust, 6.0)) row![
.padding(7), button(text("").size(13))
button(text("").size(13)) .on_press(AppMessage::MusicPrev)
.on_press(AppMessage::MusicNext) .style(b_style(color_surface, color_blue, color_text, 6.0))
.style(b_style(color_surface, color_blue, color_text, 6.0)) .padding(7),
.padding(7), button(text(music_bar_play_label).size(13))
text(format!("{elapsed} / {duration}")) .on_press(AppMessage::MusicPlayPause)
.size(11) .style(b_style(color_blue, color_lavender, color_crust, 6.0))
.color(color_subtext), .padding(7),
button(text(if state.playlist_drawer_open { "" } else { "" }).size(13)) button(text("").size(13))
.on_press(AppMessage::TogglePlaylistDrawer) .on_press(AppMessage::MusicNext)
.style(b_style( .style(b_style(color_surface, color_blue, color_text, 6.0))
if state.playlist_drawer_open { color_blue } else { color_surface }, .padding(7),
color_blue, ]
if state.playlist_drawer_open { color_crust } else { color_text }, .spacing(8)
6.0, .align_y(iced::alignment::Vertical::Center),
)) container(
.padding(7), row![
text(format!("{elapsed} / {duration}"))
.size(11)
.color(color_subtext),
button(text(if state.playlist_drawer_open { "" } else { "" }).size(13))
.on_press(AppMessage::TogglePlaylistDrawer)
.style(b_style(
if state.playlist_drawer_open { color_blue } else { color_surface },
color_blue,
if state.playlist_drawer_open { color_crust } else { color_text },
6.0,
))
.padding(7),
]
.spacing(8)
.align_y(iced::alignment::Vertical::Center)
)
.width(iced::Length::Fill)
.align_x(iced::alignment::Horizontal::Right),
] ]
.spacing(8) .spacing(8)
.align_y(iced::alignment::Vertical::Center) .align_y(iced::alignment::Vertical::Center)