mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-23 02:05:33 +07:00
floating: Implement toggle-width/height actions
This commit is contained in:
@@ -2832,6 +2832,16 @@ impl ColumnWidth {
|
||||
ColumnWidth::Fixed(width) => width,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn resolve_no_gaps(self, options: &Options, view_width: f64) -> ResolvedSize {
|
||||
match self {
|
||||
ColumnWidth::Proportion(proportion) => ResolvedSize::Tile(view_width * proportion),
|
||||
ColumnWidth::Preset(idx) => {
|
||||
options.preset_column_widths[idx].resolve_no_gaps(options, view_width)
|
||||
}
|
||||
ColumnWidth::Fixed(width) => ResolvedSize::Window(width),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<PresetSize> for ColumnWidth {
|
||||
|
||||
Reference in New Issue
Block a user