feat(commandline): float as bottom-centre overlay over the viewport

The command-line panel used to consume a full-width row at the bottom
of the main column, taking vertical space away from the drawing area
even when no command was active. Move it onto the viewport stack as a
fixed-width 720 px pill aligned to the bottom-centre, with rounded
corners so it reads as a floating element. The status bar still owns
the very bottom of the window.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 4.7 committed 2026-05-26 19:23:19 +03:00
1 parent 979ca28632
commit 862e5aed31
2 files changed
+26 -9

No files matched your search

+22 -5
View File
@@ -504,10 +504,28 @@ impl OpenCADStudio {
Space::new().into()
};
let center_stack =
iced::widget::stack![row![properties_el, viewport_stack].width(Fill).height(Fill),]
.width(Fill)
.height(Fill);
// Command-line sits as a bottom-centre overlay on top of the
// viewport stack rather than as a separate row in the main
// column — frees up vertical space when no command is active
// and keeps the input close to where the cursor is drawing.
let command_line_overlay = iced::widget::container(self.command_line.view())
.width(Fill)
.height(Fill)
.align_x(iced::alignment::Horizontal::Center)
.align_y(iced::alignment::Vertical::Bottom)
.padding(iced::Padding {
top: 0.0,
right: 0.0,
bottom: 2.0,
left: 0.0,
});
let center_stack = iced::widget::stack![
row![properties_el, viewport_stack].width(Fill).height(Fill),
command_line_overlay,
]
.width(Fill)
.height(Fill);
let main_ui = container({
let mut col = column![self.ribbon.view(
@@ -519,7 +537,6 @@ impl OpenCADStudio {
col = col.push(doc_tab_bar(&self.tabs, self.active_tab));
}
col.push(center_stack)
.push(self.command_line.view())
.push({
let is_model = tab.scene.current_layout == "Model";
let scale_pill_enabled = is_model
+4 -4
View File
@@ -149,7 +149,7 @@ impl CommandLine {
a: 1.0,
},
width: 1.0,
radius: 0.0.into(),
radius: 2.0.into(),
},
icon: Color::WHITE,
placeholder: Color {
@@ -183,7 +183,7 @@ impl CommandLine {
border: Border {
color: BORDER_COLOR,
width: 1.0,
radius: 0.0.into()
radius: 3.0.into()
},
..Default::default()
})
@@ -194,11 +194,11 @@ impl CommandLine {
border: Border {
color: BORDER_COLOR,
width: 1.0,
radius: 0.0.into(),
radius: 4.0.into(),
},
..Default::default()
})
.width(Length::Fill)
.width(Length::Fixed(720.0))
.into()
}
}