feat(start): three-part start page (Recent · Welcome · Supporters) that tabs when narrow

Rebuild the Start page as three parts — Recent Files (left), Welcome
(center) and Supporters (right) — that sit side by side while they fit.
When the page is too narrow for all three it falls back to a tab bar
(Recent Files / Welcome / Supporters) showing one section at a time, with
Welcome open by default (new StartSection state + StartSectionSelect).

The Recent Documents list moves off the left properties slot and into the
page itself. The Welcome column's button rows now flex-wrap, and the two
intro-video cards sit side by side, wrap to a stacked column when the
width gets tight, then shrink to fit the remaining height so they never
spill over the status bar. Trimmed the headline to just "Open CAD Studio"
(dropped "Welcome to" + the subtitle) and the "Release Notes" button, and
tightened the page's side padding.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-07-05 20:53:11 +03:00
1 parent 6a5402ccae
commit e2a56033d4
3 files changed
+198 -73

No files matched your search

+15
View File
@@ -208,6 +208,15 @@ struct AddSelectedRestore {
ribbon_lineweight: LineWeight,
}
/// Which Start-page section a narrow (tabbed) Start page is showing.
#[derive(Clone, Copy, PartialEq, Eq, Default, Debug)]
pub enum StartSection {
Recent,
#[default]
Welcome,
Supporters,
}
pub(super) struct OpenCADStudio {
start: Instant,
tabs: Vec<DocumentTab>,
@@ -220,6 +229,9 @@ pub(super) struct OpenCADStudio {
/// Paying Patreon supporters shown on the Start page (name, pledge cents),
/// fetched once at boot, highest pledge first.
patrons: Vec<(String, i64)>,
/// Which Start-page section is shown when the page is too narrow for all
/// three side by side and falls back to a tab bar.
start_section: StartSection,
/// Read-only editor buffer backing the command-line history dropdown, so
/// the log can be drag-selected across lines and copied (issue #232).
/// Rebuilt from the history each time the dropdown is opened.
@@ -1115,6 +1127,8 @@ pub enum Message {
OpenRecent(PathBuf),
/// Open a URL in the system browser (start-page intro video, links).
OpenUrl(String),
/// Select which section a narrow (tabbed) Start page shows.
StartSectionSelect(StartSection),
/// Scroll the status-bar layout-tab strip horizontally by `delta` px
/// (negative = left). Driven by the ‹ › arrows next to the tabs.
ScrollLayoutTabs(f32),
@@ -1960,6 +1974,7 @@ impl OpenCADStudio {
recent_files: recent::load_recent_files(),
command_line: CommandLine::new(),
patrons: Vec::new(),
start_section: StartSection::default(),
history_content: iced::widget::text_editor::Content::new(),
status_bar: StatusBar::new(),
cursor_pos: Point::ORIGIN,