mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-23 02:05:33 +07:00
tab indicator: Add corner-radius setting
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user