forked from 1b-agent/opencadstudio-upstream
feat(ui): ribbon collapse-mode selector + start-page recent controls
Ribbon: - A ▾ selector at the right of the tab row picks the tool-panel density — Auto (size to window), Full, Compact, or Collapsed. The choice is persisted. It hides itself when the tool row is already tight, giving the cramped tab row its space back. Start page: - The Recent Documents card is restyled to match the Supporters card (rounded corners, 20px padding, matching title + colours). - Its scrollbar no longer sits on top of the row ✕ remove buttons (a gutter is reserved). - A footer control sets how many recent files to keep: [-] an editable count [+] with the max shown. Typing applies on Enter; an over-max entry snaps to the max. The limit is persisted and enforced on load and on every open. - The "Support on Patreon" heart is now the SVG icon instead of a font glyph. Config: - Add a shared `config::config_dir()` helper; the recent-files and status-bar stores now go through it instead of each re-deriving the path. New minus.svg icon for the stepper. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
8e6146fd91
commit
f4ed263425
13 files changed
+457
-112
No files matched your search
@@ -257,6 +257,19 @@ impl OpenCADStudio {
|
||||
Task::none()
|
||||
}
|
||||
|
||||
Message::SetRecentLimit(limit) => {
|
||||
self.set_recent_limit(limit);
|
||||
// Resync the input box to the clamped, applied value.
|
||||
self.recent_limit_input = self.recent_limit.to_string();
|
||||
Task::none()
|
||||
}
|
||||
|
||||
Message::RecentLimitInput(s) => {
|
||||
// Keep only digits while typing; applied on Enter (SetRecentLimit).
|
||||
self.recent_limit_input = s.chars().filter(|c| c.is_ascii_digit()).collect();
|
||||
Task::none()
|
||||
}
|
||||
|
||||
Message::OpenPathPicked(Some((path, size_bytes))) => {
|
||||
let name = path
|
||||
.file_name()
|
||||
@@ -608,6 +621,12 @@ impl OpenCADStudio {
|
||||
Task::none()
|
||||
}
|
||||
|
||||
Message::SetRibbonCollapseMode(mode) => {
|
||||
self.ribbon.set_collapse_mode(mode);
|
||||
self.ribbon.close_dropdown();
|
||||
Task::none()
|
||||
}
|
||||
|
||||
Message::RibbonToolClick { tool_id, event } => {
|
||||
self.on_ribbon_tool_click(tool_id, event)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user