shell: Enforce some minimum resize sizes

This commit is contained in:
Victoria Brekenfeld 2023-07-07 18:23:34 +02:00
parent 0ebcfa24a3
commit 92019b4286
3 changed files with 23 additions and 4 deletions

View file

@ -1536,7 +1536,12 @@ impl TilingLayout {
};
let old_size = sizes[shrink_idx];
sizes[shrink_idx] = (old_size - amount).max(10);
sizes[shrink_idx] =
(old_size - amount).max(if orientation == Orientation::Vertical {
360
} else {
240
});
let diff = old_size - sizes[shrink_idx];
sizes[grow_idx] += diff;
}