From 4310405ce33ad7e491ee2d3b6f293cedc68c7054 Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Wed, 29 Jul 2026 23:35:46 +0300 Subject: [PATCH] fix(start): reserve command line space Closes #546 --- src/app/view/mod.rs | 50 ++++++++++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/src/app/view/mod.rs b/src/app/view/mod.rs index 9ce2db475..fcb3c68b1 100644 --- a/src/app/view/mod.rs +++ b/src/app/view/mod.rs @@ -1325,10 +1325,10 @@ impl OpenCADStudio { Space::new().into() }; - // 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. + // Drawing viewports keep the command line as a bottom-centre overlay so + // the input stays close to the cursor. The Start page gives it a real + // layout row instead: its panels and action buttons must end above the + // command line rather than rendering behind it (#546). // Autocomplete shows only when no command is collecting its // own input (otherwise typed prefixes are coordinates / values). let allow_autocomplete = tab.active_cmd.is_none(); @@ -1340,12 +1340,30 @@ impl OpenCADStudio { (self.dyn_input && tab.active_cmd.is_some() && !tab.dyn_fields.is_empty()) || self.mtext_editor.as_ref().is_some_and(|e| e.show_preview) || self.text_inline.is_some(); - let command_line_overlay = - iced::widget::container(self.command_line.view( - allow_autocomplete, - dyn_capturing, - &self.history_content, - )) + let workspace = row![properties_el, viewport_stack].width(Fill).height(Fill); + let command_line = self.command_line.view( + allow_autocomplete, + dyn_capturing, + &self.history_content, + ); + let center_stack: Element<'_, Message> = if tab.is_start { + column![ + workspace, + iced::widget::container(command_line) + .width(Fill) + .align_x(iced::alignment::Horizontal::Center) + .padding(iced::Padding { + top: 0.0, + right: 0.0, + bottom: 2.0, + left: 0.0, + }), + ] + .width(Fill) + .height(Fill) + .into() + } else { + let command_line_overlay = iced::widget::container(command_line) .width(Fill) .height(Fill) .align_x(iced::alignment::Horizontal::Center) @@ -1356,13 +1374,11 @@ impl OpenCADStudio { 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); + iced::widget::stack![workspace, command_line_overlay] + .width(Fill) + .height(Fill) + .into() + }; let main_ui = container({ // Clean-screen mode drops the ribbon for a full-canvas view; the