Move default_border() into FocusRing

This commit is contained in:
Ivan Molodetskikh
2024-02-12 09:22:22 +04:00
parent a9fcbf81eb
commit 6e23073019
2 changed files with 10 additions and 8 deletions
+4 -2
View File
@@ -281,7 +281,7 @@ pub struct Mode {
pub struct Layout {
#[knuffel(child, default)]
pub focus_ring: FocusRing,
#[knuffel(child, default = default_border())]
#[knuffel(child, default = FocusRing::default_border())]
pub border: FocusRing,
#[knuffel(child, unwrap(children), default)]
pub preset_column_widths: Vec<PresetWidth>,
@@ -324,13 +324,15 @@ impl Default for FocusRing {
}
}
pub const fn default_border() -> FocusRing {
impl FocusRing {
pub const fn default_border() -> FocusRing {
FocusRing {
off: true,
width: 4,
active_color: Color::new(255, 200, 127, 255),
inactive_color: Color::new(80, 80, 80, 255),
}
}
}
#[derive(knuffel::Decode, Debug, Default, Clone, Copy, PartialEq, Eq)]
+1 -1
View File
@@ -168,7 +168,7 @@ impl Default for Options {
gaps: 16,
struts: Default::default(),
focus_ring: Default::default(),
border: niri_config::default_border(),
border: niri_config::FocusRing::default_border(),
center_focused_column: Default::default(),
preset_widths: vec![
ColumnWidth::Proportion(1. / 3.),