forked from 1b-agent/opencadstudio-upstream
fix(plot): the new page setup name has room to be read
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 <[email protected]>
This commit is contained in:
1 parent
d9849e35ab
commit
43cca2094b
1 file changed
+16
-9
+16
-9
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user