mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-23 02:05:33 +07:00
implement always_center_single_column layout option
This commit is contained in:
committed by
Ivan Molodetskikh
parent
952916fd1c
commit
fd8ebb9d06
@@ -236,6 +236,7 @@ pub struct Options {
|
||||
pub focus_ring: niri_config::FocusRing,
|
||||
pub border: niri_config::Border,
|
||||
pub center_focused_column: CenterFocusedColumn,
|
||||
pub always_center_single_column: bool,
|
||||
/// Column widths that `toggle_width()` switches between.
|
||||
pub preset_widths: Vec<ColumnWidth>,
|
||||
/// Initial width for new columns.
|
||||
@@ -255,6 +256,7 @@ impl Default for Options {
|
||||
focus_ring: Default::default(),
|
||||
border: Default::default(),
|
||||
center_focused_column: Default::default(),
|
||||
always_center_single_column: false,
|
||||
preset_widths: vec![
|
||||
ColumnWidth::Proportion(1. / 3.),
|
||||
ColumnWidth::Proportion(0.5),
|
||||
@@ -297,6 +299,7 @@ impl Options {
|
||||
focus_ring: layout.focus_ring,
|
||||
border: layout.border,
|
||||
center_focused_column: layout.center_focused_column,
|
||||
always_center_single_column: layout.always_center_single_column,
|
||||
preset_widths,
|
||||
default_width,
|
||||
animations: config.animations.clone(),
|
||||
@@ -4455,11 +4458,13 @@ mod tests {
|
||||
focus_ring in arbitrary_focus_ring(),
|
||||
border in arbitrary_border(),
|
||||
center_focused_column in arbitrary_center_focused_column(),
|
||||
always_center_single_column in any::<bool>(),
|
||||
) -> Options {
|
||||
Options {
|
||||
gaps,
|
||||
struts,
|
||||
center_focused_column,
|
||||
always_center_single_column,
|
||||
focus_ring,
|
||||
border,
|
||||
..Default::default()
|
||||
|
||||
Reference in New Issue
Block a user