diff --git a/src/app/mod.rs b/src/app/mod.rs index 805c123..1931ec4 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -1632,18 +1632,15 @@ fn view(state: &AppState) -> Element<'_, AppMessage> { .on_input(move |v| AppMessage::RenameFriend(fid, v)) .style(t_style) .padding(6) - .width(iced::Length::FillPortion(2)), - text(id_short) - .size(11) - .color(color_subtext) - .width(iced::Length::FillPortion(2)), + .width(iced::Length::Fixed(240.0)), button(text("Remove").size(12)) .on_press(AppMessage::RemoveFriend(fid)) .style(b_style(color_surface, color_maroon, color_text, 6.0)) .padding(6), - // Reserve clearance so the button doesn't sit under the - // scrollbar gutter at the right edge. - horizontal_space().width(iced::Length::Fixed(12.0)), + text(id_short).size(11).color(color_subtext), + // Absorb the remaining width so the row is left-aligned and + // nothing stretches to / under the scrollbar edge. + horizontal_space(), ] .spacing(8) .align_y(iced::alignment::Vertical::Center), @@ -1665,17 +1662,18 @@ fn view(state: &AppState) -> Element<'_, AppMessage> { .on_input(AppMessage::FriendAddIdChanged) .style(t_style) .padding(6) - .width(iced::Length::FillPortion(3)), + .width(iced::Length::Fixed(340.0)), text_input("Name (optional)", &state.friend_add_name) .on_input(AppMessage::FriendAddNameChanged) .style(t_style) .padding(6) - .width(iced::Length::FillPortion(2)), + .width(iced::Length::Fixed(170.0)), button(text("Add").size(13)) .on_press(AppMessage::AddFriend) .style(b_style(color_surface, color_blue, color_text, 6.0)) .padding(8), - horizontal_space().width(iced::Length::Fixed(12.0)), + // Left-align the compact inputs; absorb the rest of the row. + horizontal_space(), ] .spacing(8) .align_y(iced::alignment::Vertical::Center),