forge
Explore
Log in

Don't you dare go Hollow

Move default_border() into FocusRing

Browse files at this commit

6e2307301991a187b8d4a28cdbbf7a49d33039d5Ivan MolodetskikhParent: a9fcbf8
niri-config/src/lib.rsmodified+9 -7
@@ -281,7 +281,7 @@ pub struct Mode {
281 pub struct Layout {281 pub struct Layout {
282 #[knuffel(child, default)]282 #[knuffel(child, default)]
283 pub focus_ring: FocusRing,283 pub focus_ring: FocusRing,
284- #[knuffel(child, default = default_border())]284+ #[knuffel(child, default = FocusRing::default_border())]
285 pub border: FocusRing,285 pub border: FocusRing,
286 #[knuffel(child, unwrap(children), default)]286 #[knuffel(child, unwrap(children), default)]
287 pub preset_column_widths: Vec<PresetWidth>,287 pub preset_column_widths: Vec<PresetWidth>,
@@ -324,12 +324,14 @@ impl Default for FocusRing {
324 }324 }
325 }325 }
326 326
327-pub const fn default_border() -> FocusRing {327+impl FocusRing {
328- FocusRing {328+ pub const fn default_border() -> FocusRing {
329- off: true,329+ FocusRing {
330- width: 4,330+ off: true,
331- active_color: Color::new(255, 200, 127, 255),331+ width: 4,
332- inactive_color: Color::new(80, 80, 80, 255),332+ active_color: Color::new(255, 200, 127, 255),
333+ inactive_color: Color::new(80, 80, 80, 255),
334+ }
333 }335 }
334 }336 }
335 337
src/layout/mod.rsmodified+1 -1
@@ -168,7 +168,7 @@ impl Default for Options {
168 gaps: 16,168 gaps: 16,
169 struts: Default::default(),169 struts: Default::default(),
170 focus_ring: Default::default(),170 focus_ring: Default::default(),
171- border: niri_config::default_border(),171+ border: niri_config::FocusRing::default_border(),
172 center_focused_column: Default::default(),172 center_focused_column: Default::default(),
173 preset_widths: vec![173 preset_widths: vec![
174 ColumnWidth::Proportion(1. / 3.),174 ColumnWidth::Proportion(1. / 3.),