config: Split Layout from LayoutPart

This commit is contained in:
Ivan Molodetskikh
2025-09-20 12:57:41 +03:00
parent 2781d3a743
commit 1fa9dd32ed
21 changed files with 579 additions and 434 deletions
+2 -2
View File
@@ -3,7 +3,7 @@ use std::time::Duration;
use niri::layout::focus_ring::FocusRing;
use niri::render_helpers::border::BorderRenderElement;
use niri_config::{Color, CornerRadius, FloatOrInt, GradientInterpolation};
use niri_config::{Color, CornerRadius, GradientInterpolation};
use smithay::backend::renderer::element::RenderElement;
use smithay::backend::renderer::gles::GlesRenderer;
use smithay::utils::{Physical, Point, Rectangle, Size};
@@ -20,7 +20,7 @@ impl GradientArea {
pub fn new(_args: Args) -> Self {
let border = FocusRing::new(niri_config::FocusRing {
off: false,
width: FloatOrInt(1.),
width: 1.,
active_color: Color::from_rgba8_unpremul(255, 255, 255, 128),
inactive_color: Color::default(),
urgent_color: Color::default(),
+2 -2
View File
@@ -4,7 +4,7 @@ use std::time::Duration;
use niri::animation::Clock;
use niri::layout::{ActivateWindow, AddWindowTarget, LayoutElement as _, Options};
use niri::render_helpers::RenderTarget;
use niri_config::{Color, FloatOrInt, OutputName, PresetSize};
use niri_config::{Color, OutputName, PresetSize};
use smithay::backend::renderer::element::RenderElement;
use smithay::backend::renderer::gles::GlesRenderer;
use smithay::desktop::layer_map_for_output;
@@ -58,7 +58,7 @@ impl Layout {
},
border: niri_config::Border {
off: false,
width: FloatOrInt(4.),
width: 4.,
active_color: Color::from_rgba8_unpremul(255, 163, 72, 255),
inactive_color: Color::from_rgba8_unpremul(50, 50, 50, 255),
urgent_color: Color::from_rgba8_unpremul(155, 0, 0, 255),
+2 -2
View File
@@ -3,7 +3,7 @@ use std::time::Duration;
use niri::layout::Options;
use niri::render_helpers::RenderTarget;
use niri_config::{Color, FloatOrInt};
use niri_config::Color;
use smithay::backend::renderer::element::RenderElement;
use smithay::backend::renderer::gles::GlesRenderer;
use smithay::utils::{Physical, Point, Rectangle, Size};
@@ -64,7 +64,7 @@ impl Tile {
},
border: niri_config::Border {
off: false,
width: FloatOrInt(32.),
width: 32.,
active_color: Color::from_rgba8_unpremul(255, 163, 72, 255),
..Default::default()
},