Always honor min height in new window size

This commit is contained in:
Ivan Molodetskikh
2024-12-12 08:50:30 +03:00
parent 10460191b9
commit f2bec1f82f
+4
View File
@@ -1,3 +1,4 @@
use std::cmp::max;
use std::rc::Rc;
use std::time::Duration;
@@ -701,6 +702,9 @@ impl<W: LayoutElement> Workspace<W> {
// will only honor fixed height currently.
if min_size.h == max_size.h {
size.h = ensure_min_max_size(size.h, min_size.h, max_size.h);
} else if size.h > 0 {
// Also always honor min height, scrolling always does.
size.h = max(size.h, min_size.h);
}
size