forked from 1b-agent/opencadstudio-upstream
style(ribbon): tint, rather than fill, the tab holding the running command
A full-strength fill on a large tab header read louder than the selected tab's outline. A faint wash of the same blue still points at the tab without looking selected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1093900a49
commit
278e15405d
2 files changed
+11
-4
No files matched your search
Binary file not shown.
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
+11
-4
@@ -521,8 +521,9 @@ impl Ribbon {
|
|||||||
// The quick-access flow and the tabs flow each flex-wrap; WrapBar stacks
|
// The quick-access flow and the tabs flow each flex-wrap; WrapBar stacks
|
||||||
// them so a wrapped tab never shares a row with a quick-access button.
|
// them so a wrapped tab never shares a row with a quick-access button.
|
||||||
|
|
||||||
// A running command whose button is on another tab lights that tab's
|
// A running command whose button is on another tab tints that tab's
|
||||||
// header in the button's own blue, pointing at where the button lives.
|
// header with a faint wash of the button's blue, pointing at where the
|
||||||
|
// button lives without competing with the selected tab's outline.
|
||||||
let holding_tab = self.tab_holding_active_tool();
|
let holding_tab = self.tab_holding_active_tool();
|
||||||
let tab_items = self.modules.iter().enumerate().fold(
|
let tab_items = self.modules.iter().enumerate().fold(
|
||||||
Vec::<Element<'_, Message>>::new(),
|
Vec::<Element<'_, Message>>::new(),
|
||||||
@@ -562,9 +563,15 @@ impl Ribbon {
|
|||||||
background: (is_active
|
background: (is_active
|
||||||
|| holds_tool
|
|| holds_tool
|
||||||
|| matches!(status, button::Status::Hovered))
|
|| matches!(status, button::Status::Hovered))
|
||||||
.then_some(Background::Color(pair.color)),
|
.then_some(Background::Color(if holds_tool && !is_active {
|
||||||
text_color: if is_active || holds_tool {
|
pair.color.scale_alpha(0.35)
|
||||||
|
} else {
|
||||||
|
pair.color
|
||||||
|
})),
|
||||||
|
text_color: if is_active {
|
||||||
pair.text
|
pair.text
|
||||||
|
} else if holds_tool {
|
||||||
|
palette.background.base.text
|
||||||
} else if is_contextual {
|
} else if is_contextual {
|
||||||
accent.color
|
accent.color
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in new issue
Block a user