feat(ui): refine drawing tabs

Use theme-driven active and hover states, integrate close controls, and keep tab spacing stable across drawing states.

Refs #481
This commit is contained in:
Hakan Seven committed 2026-08-04 19:04:59 +03:00
1 parent 9cf0c9f945
commit 7c893d8f5f
3 files changed
+109 -28

No files matched your search

+4
View File
@@ -263,6 +263,7 @@ pub(super) struct OpenCADStudio {
start: Instant,
tabs: Vec<DocumentTab>,
active_tab: usize,
hovered_doc_tab: Option<usize>,
tab_counter: usize,
ribbon: Ribbon,
/// Recently opened files, newest first — backs the Start page panel.
@@ -1730,6 +1731,8 @@ pub enum Message {
TabNew,
/// Switch to the given tab index.
TabSwitch(usize),
/// Drawing tab currently under the pointer; controls integrated close affordance.
DocTabHover(Option<usize>),
/// Move a drawing tab before/after another drawing tab.
TabReorder {
from: usize,
@@ -2834,6 +2837,7 @@ impl OpenCADStudio {
start: Instant::now(),
tabs: vec![start_tab],
active_tab: 0,
hovered_doc_tab: None,
tab_counter: 0,
ribbon: Ribbon::new(),
// Populated from the consolidated config after construction