diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2025-02-12 07:59:21 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-02-12 07:59:46 +0300 |
| commit | 7e552333a993e83a2dba52392109617e486f5f60 (patch) | |
| tree | 35b9079787535667fe844e2178ffd6bf42db8626 /niri-config | |
| parent | 213eafa2032897e7ce3132f179a135a65d327d9b (diff) | |
| download | niri-7e552333a993e83a2dba52392109617e486f5f60.tar.gz niri-7e552333a993e83a2dba52392109617e486f5f60.tar.bz2 niri-7e552333a993e83a2dba52392109617e486f5f60.zip | |
tab indicator: Add corner-radius setting
Diffstat (limited to 'niri-config')
| -rw-r--r-- | niri-config/src/lib.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/niri-config/src/lib.rs b/niri-config/src/lib.rs index 701f5c5a..7d65008e 100644 --- a/niri-config/src/lib.rs +++ b/niri-config/src/lib.rs @@ -697,6 +697,8 @@ pub struct TabIndicator { pub position: TabIndicatorPosition, #[knuffel(child, unwrap(argument), default = Self::default().gaps_between_tabs)] pub gaps_between_tabs: FloatOrInt<0, 65535>, + #[knuffel(child, unwrap(argument), default = Self::default().corner_radius)] + pub corner_radius: FloatOrInt<0, 65535>, #[knuffel(child)] pub active_color: Option<Color>, #[knuffel(child)] @@ -720,6 +722,7 @@ impl Default for TabIndicator { }, position: TabIndicatorPosition::Left, gaps_between_tabs: FloatOrInt(0.), + corner_radius: FloatOrInt(0.), active_color: None, inactive_color: None, active_gradient: None, @@ -1234,6 +1237,17 @@ impl From<CornerRadius> for [f32; 4] { } } +impl From<f32> for CornerRadius { + fn from(value: f32) -> Self { + Self { + top_left: value, + top_right: value, + bottom_right: value, + bottom_left: value, + } + } +} + #[derive(knuffel::DecodeScalar, Debug, Clone, Copy, PartialEq, Eq)] pub enum BlockOutFrom { Screencast, |
