diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2025-05-10 22:34:53 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-05-10 22:42:45 +0300 |
| commit | 58166914607025ae9fb20d868138238bebd4c6bc (patch) | |
| tree | 9c1b583ecfd03b98a74288749b682166ceb2c16e /src/layout/tab_indicator.rs | |
| parent | 4b5e9e6cb08d269506cad8273ca7e9c93378034e (diff) | |
| download | niri-58166914607025ae9fb20d868138238bebd4c6bc.tar.gz niri-58166914607025ae9fb20d868138238bebd4c6bc.tar.bz2 niri-58166914607025ae9fb20d868138238bebd4c6bc.zip | |
Add urgent color support to tab indicators
Diffstat (limited to 'src/layout/tab_indicator.rs')
| -rw-r--r-- | src/layout/tab_indicator.rs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/layout/tab_indicator.rs b/src/layout/tab_indicator.rs index dd048469..e35874e8 100644 --- a/src/layout/tab_indicator.rs +++ b/src/layout/tab_indicator.rs @@ -350,13 +350,16 @@ impl TabInfo { tile: &Tile<W>, position: Point<f64, Logical>, is_active: bool, + is_urgent: bool, config: &niri_config::TabIndicator, ) -> Self { let rules = tile.window().rules(); let rule = rules.tab_indicator; let gradient_from_rule = || { - let (color, gradient) = if is_active { + let (color, gradient) = if is_urgent { + (rule.urgent_color, rule.urgent_gradient) + } else if is_active { (rule.active_color, rule.active_gradient) } else { (rule.inactive_color, rule.inactive_gradient) @@ -366,7 +369,9 @@ impl TabInfo { }; let gradient_from_config = || { - let (color, gradient) = if is_active { + let (color, gradient) = if is_urgent { + (config.urgent_color, config.urgent_gradient) + } else if is_active { (config.active_color, config.active_gradient) } else { (config.inactive_color, config.inactive_gradient) @@ -386,7 +391,9 @@ impl TabInfo { focus_ring_config }; - let (color, gradient) = if is_active { + let (color, gradient) = if is_urgent { + (config.urgent_color, config.urgent_gradient) + } else if is_active { (config.active_color, config.active_gradient) } else { (config.inactive_color, config.inactive_gradient) |
