forked from 1b-agent/opencadstudio-upstream
feat(app): add fixed Start tab with welcome page and recent documents
A pinned "Start" tab now lives at index 0. It cannot be closed, opens on launch, and replaces the model-space viewport with a welcome page — similar to Thunderbird's first-run screen. - Boot opens with only the Start tab; Drawing1 is no longer auto-spawned. - The Properties left panel becomes a Recent Documents rail on the Start tab. Recents persist to disk (%APPDATA%/H7CAD/recent.txt on Windows, $XDG_CONFIG_HOME/H7CAD/recent.txt on Linux, ~/Library/Application Support/H7CAD/recent.txt on macOS), up to 20 entries, saved on every open and rehydrated at boot. Each row opens or removes the file in place. - The Support ribbon group (Donate / Report / About / Changelog) is retired; the same actions surface on the welcome page instead. The Donate button is the primary call-to-action — solid #B03020 brand fill with a soft brand-tinted ambient glow halo behind the action row (Thunderbird-style coloured glow against the neutral page). - Drawing-only overlays (mouse-area, viewcube, navbar, dynamic input, selection markers) are suppressed on the Start tab so its clicks don't trigger CAD commands. OpenFile's "current_is_empty" check refuses to replace the Start tab, and TabClose ignores requests on it. Co-Authored-By: Claude Opus 4.7 <[email protected]>
This commit is contained in:
1 parent
3fb23ae31b
commit
35acdb2dc8
10 files changed
+515
-72
No files matched your search
@@ -1,5 +1,6 @@
|
||||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn tool() -> ToolDef {
|
||||
ToolDef {
|
||||
id: "ABOUT",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn tool() -> ToolDef {
|
||||
ToolDef {
|
||||
id: "CHANGELOG",
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
|
||||
// Kept for the command-line route ("DONATE" cmd) and possible future ribbon
|
||||
// re-introduction; currently the Start tab invokes the same command directly.
|
||||
#[allow(dead_code)]
|
||||
pub fn tool() -> ToolDef {
|
||||
ToolDef {
|
||||
id: "DONATE",
|
||||
|
||||
+2
-13
@@ -31,10 +31,7 @@ impl CadModule for HomeModule {
|
||||
angular_dim, leader_cmd, linear_dim, mleader_cmd, mtext, radius_dim, text,
|
||||
};
|
||||
use crate::modules::insert::{create_block, insert_block};
|
||||
use about;
|
||||
use changelog;
|
||||
use clipboard::{copy_clip, cut, paste};
|
||||
use donate;
|
||||
use draw::{arc, circle, ellipse, hatch, line, polyline, shapes};
|
||||
use groups::{group, ungroup};
|
||||
use layers::{
|
||||
@@ -45,7 +42,6 @@ impl CadModule for HomeModule {
|
||||
translate, trim,
|
||||
};
|
||||
use properties::match_prop;
|
||||
use report;
|
||||
|
||||
vec![
|
||||
RibbonGroup {
|
||||
@@ -223,15 +219,8 @@ impl CadModule for HomeModule {
|
||||
cut::tool().into(),
|
||||
],
|
||||
},
|
||||
RibbonGroup {
|
||||
title: "Support",
|
||||
tools: vec![
|
||||
RibbonItem::LargeTool(donate::tool()),
|
||||
report::tool().into(),
|
||||
about::tool().into(),
|
||||
changelog::tool().into(),
|
||||
],
|
||||
},
|
||||
// Support group lives on the Start tab now (see view.rs:
|
||||
// start_page_view). Removed from the Home ribbon to declutter.
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn tool() -> ToolDef {
|
||||
ToolDef {
|
||||
id: "REPORT",
|
||||
|
||||
Reference in new issue
Block a user