debugger: Improve focus states (#29469)

Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
This commit is contained in:
Piotr Osiewicz
2025-04-26 15:02:07 +02:00
committed by GitHub
parent 3fdbc3090d
commit 1e47dfce79
4 changed files with 34 additions and 13 deletions
+9 -1
View File
@@ -214,12 +214,20 @@ pub struct TabContentParams {
pub detail: Option<usize>,
pub selected: bool,
pub preview: bool,
/// Tab content should be deemphasized when active pane does not have focus.
pub deemphasized: bool,
}
impl TabContentParams {
/// Returns the text color to be used for the tab content.
pub fn text_color(&self) -> Color {
if self.selected {
if self.deemphasized {
if self.selected {
Color::Muted
} else {
Color::Hidden
}
} else if self.selected {
Color::Default
} else {
Color::Muted
+2
View File
@@ -2147,6 +2147,7 @@ impl Pane {
detail: Some(detail),
selected: is_active,
preview: is_preview,
deemphasized: !self.has_focus(window, cx),
},
window,
cx,
@@ -3687,6 +3688,7 @@ impl Render for DraggedTab {
detail: Some(self.detail),
selected: false,
preview: false,
deemphasized: false,
},
window,
cx,