mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-24 02:01:18 +07:00
Fix set-window-height SetProportion scale
This commit is contained in:
@@ -3579,8 +3579,9 @@ impl<W: LayoutElement> Column<W> {
|
|||||||
let mut window_height = match change {
|
let mut window_height = match change {
|
||||||
SizeChange::SetFixed(fixed) => f64::from(fixed),
|
SizeChange::SetFixed(fixed) => f64::from(fixed),
|
||||||
SizeChange::SetProportion(proportion) => {
|
SizeChange::SetProportion(proportion) => {
|
||||||
let tile_height =
|
let tile_height = (self.working_area.size.h - self.options.gaps)
|
||||||
(self.working_area.size.h - self.options.gaps) * proportion - self.options.gaps;
|
* (proportion / 100.)
|
||||||
|
- self.options.gaps;
|
||||||
tile.window_height_for_tile_height(tile_height)
|
tile.window_height_for_tile_height(tile_height)
|
||||||
}
|
}
|
||||||
SizeChange::AdjustFixed(delta) => current_window_px + f64::from(delta),
|
SizeChange::AdjustFixed(delta) => current_window_px + f64::from(delta),
|
||||||
|
|||||||
Reference in New Issue
Block a user