From 43cca2094b2a0b089c1b46a2b6d69f1f7c744968 Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Thu, 15 Oct 2026 21:59:18 +0300 Subject: [PATCH] fix(plot): the new page setup name has room to be read MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The name field shared the 160 px sidebar row with Save and the close button, so it was squeezed until no text showed. It now takes the full width with the buttons below it, and the close button is the SVG icon instead of a "×" glyph. (#1817) Co-Authored-By: Claude Opus 5.5 --- src/ui/window/plot.rs | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) 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()