diff --git a/src/ui/window/plot.rs b/src/ui/window/plot.rs index 004f5a710..0f7d8fab0 100644 --- a/src/ui/window/plot.rs +++ b/src/ui/window/plot.rs @@ -1217,8 +1217,10 @@ pub fn view_window( } else { scrollable(column(rows).spacing(1)).height(height).into() }; + // The name gets the sidebar's full width; beside the buttons it was + // squeezed to nothing. (#1817) let new_name: Element<'_, Message> = if !s.name_rename && s.name_input.is_some() { - row![ + column![ text_input("", rename_buf) .on_input(|value| Message::PlotDlg(PlotDlgMsg::NameInput(value))) .on_submit(Message::PlotDlg(PlotDlgMsg::NameCommit)) @@ -1226,14 +1228,19 @@ pub fn view_window( .size(11) .padding([4, 8]) .width(Length::Fill), - button(text(t!("Save")).size(11)) - .on_press(Message::PlotDlg(PlotDlgMsg::NameCommit)) - .style(btn(true)) - .padding([4, 8]), - button(text("×").size(11)) - .on_press(Message::PlotDlg(PlotDlgMsg::NameCancel)) - .style(btn(false)) - .padding([4, 8]), + row![ + Space::new().width(Length::Fill), + button(text(t!("Save")).size(11)) + .on_press(Message::PlotDlg(PlotDlgMsg::NameCommit)) + .style(btn(true)) + .padding([4, 8]), + button(crate::ui::icons::semantic(crate::ui::icons::CLOSE, 11.0)) + .on_press(Message::PlotDlg(PlotDlgMsg::NameCancel)) + .style(btn(false)) + .padding([4, 8]), + ] + .spacing(4) + .align_y(iced::Center), ] .spacing(4) .into()