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:
+19
-1
@@ -5728,12 +5728,19 @@ fn view(state: &AppState) -> Element<'_, AppMessage> {
|
|||||||
.map(format_clip_time)
|
.map(format_clip_time)
|
||||||
.unwrap_or_else(|| "--:--".to_string());
|
.unwrap_or_else(|| "--:--".to_string());
|
||||||
let player_bar = container(
|
let player_bar = container(
|
||||||
|
row![
|
||||||
|
container(
|
||||||
row![
|
row![
|
||||||
text("♪").size(18).color(color_blue),
|
text("♪").size(18).color(color_blue),
|
||||||
text(now_playing_label(listening_peer_name, current_track_name))
|
text(now_playing_label(listening_peer_name, current_track_name))
|
||||||
.size(13)
|
.size(13)
|
||||||
.color(color_text)
|
.color(color_text),
|
||||||
|
]
|
||||||
|
.spacing(8)
|
||||||
|
.align_y(iced::alignment::Vertical::Center)
|
||||||
|
)
|
||||||
.width(iced::Length::Fill),
|
.width(iced::Length::Fill),
|
||||||
|
row![
|
||||||
button(text("⏮").size(13))
|
button(text("⏮").size(13))
|
||||||
.on_press(AppMessage::MusicPrev)
|
.on_press(AppMessage::MusicPrev)
|
||||||
.style(b_style(color_surface, color_blue, color_text, 6.0))
|
.style(b_style(color_surface, color_blue, color_text, 6.0))
|
||||||
@@ -5746,6 +5753,11 @@ fn view(state: &AppState) -> Element<'_, AppMessage> {
|
|||||||
.on_press(AppMessage::MusicNext)
|
.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),
|
||||||
|
]
|
||||||
|
.spacing(8)
|
||||||
|
.align_y(iced::alignment::Vertical::Center),
|
||||||
|
container(
|
||||||
|
row![
|
||||||
text(format!("{elapsed} / {duration}"))
|
text(format!("{elapsed} / {duration}"))
|
||||||
.size(11)
|
.size(11)
|
||||||
.color(color_subtext),
|
.color(color_subtext),
|
||||||
@@ -5762,6 +5774,12 @@ fn view(state: &AppState) -> Element<'_, AppMessage> {
|
|||||||
.spacing(8)
|
.spacing(8)
|
||||||
.align_y(iced::alignment::Vertical::Center)
|
.align_y(iced::alignment::Vertical::Center)
|
||||||
)
|
)
|
||||||
|
.width(iced::Length::Fill)
|
||||||
|
.align_x(iced::alignment::Horizontal::Right),
|
||||||
|
]
|
||||||
|
.spacing(8)
|
||||||
|
.align_y(iced::alignment::Vertical::Center)
|
||||||
|
)
|
||||||
.style(c_style(color_mantle, color_surface, 8.0))
|
.style(c_style(color_mantle, color_surface, 8.0))
|
||||||
.padding(10)
|
.padding(10)
|
||||||
.width(iced::Length::Fill)
|
.width(iced::Length::Fill)
|
||||||
|
|||||||
Reference in New Issue
Block a user