diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2025-09-20 12:57:42 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-10-02 09:33:08 +0300 |
| commit | 4c524b47196badd281bc159bef3137cf16f963e5 (patch) | |
| tree | 3284ab9c888e5883a525dbf04ad32818cc1c7f81 /src/layout/workspace.rs | |
| parent | 1fa9dd32ed028c88248644a13421c098fef72894 (diff) | |
| download | niri-4c524b47196badd281bc159bef3137cf16f963e5.tar.gz niri-4c524b47196badd281bc159bef3137cf16f963e5.tar.bz2 niri-4c524b47196badd281bc159bef3137cf16f963e5.zip | |
layout: Store Layout directly in Options
Diffstat (limited to 'src/layout/workspace.rs')
| -rw-r--r-- | src/layout/workspace.rs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/layout/workspace.rs b/src/layout/workspace.rs index 8c1c36d3..2d71ad1b 100644 --- a/src/layout/workspace.rs +++ b/src/layout/workspace.rs @@ -754,7 +754,7 @@ impl<W: LayoutElement> Workspace<W> { Some(Some(width)) => Some(width), Some(None) => None, None if is_floating => None, - None => self.options.default_column_width, + None => self.options.layout.default_column_width, } } @@ -1272,11 +1272,12 @@ impl<W: LayoutElement> Workspace<W> { // Come up with a default floating position close to the tile position. let stored_or_default = self.floating.stored_or_default_tile_pos(&removed.tile); if stored_or_default.is_none() { - let offset = if self.options.center_focused_column == CenterFocusedColumn::Always { - Point::from((0., 0.)) - } else { - Point::from((50., 50.)) - }; + let offset = + if self.options.layout.center_focused_column == CenterFocusedColumn::Always { + Point::from((0., 0.)) + } else { + Point::from((50., 50.)) + }; let pos = render_pos + offset; let size = removed.tile.tile_size(); let pos = self.floating.clamp_within_working_area(pos, size); |
