Fix set_width/set_min_width/set_height/set_min_height
Closes https://github.com/emilk/egui/issues/647 Broke in https://github.com/emilk/egui/pull/629
This commit is contained in:
parent
cb566fc295
commit
01d3f53113
|
|
@ -7,6 +7,10 @@ NOTE: [`eframe`](eframe/CHANGELOG.md), [`egui_web`](egui_web/CHANGELOG.md) and [
|
|||
|
||||
## Unreleased
|
||||
|
||||
### Fixed 🐛
|
||||
|
||||
* Fix `set_width/set_min_width/set_height/set_min_height`
|
||||
|
||||
|
||||
## 0.14.0 - 2021-08-24 - Ui panels and bug fixes
|
||||
|
||||
|
|
|
|||
|
|
@ -223,6 +223,9 @@ impl Placer {
|
|||
region.max_rect.min.x = rect.min.x;
|
||||
region.max_rect.max.x = rect.max.x;
|
||||
region.max_rect = region.max_rect.union(region.min_rect); // make sure we didn't shrink too much
|
||||
|
||||
region.cursor.min.x = region.max_rect.min.x;
|
||||
region.cursor.max.x = region.max_rect.max.x;
|
||||
}
|
||||
|
||||
/// Set the maximum height of the ui.
|
||||
|
|
@ -233,6 +236,9 @@ impl Placer {
|
|||
region.max_rect.min.y = rect.min.y;
|
||||
region.max_rect.max.y = rect.max.y;
|
||||
region.max_rect = region.max_rect.union(region.min_rect); // make sure we didn't shrink too much
|
||||
|
||||
region.cursor.min.y = region.max_rect.min.y;
|
||||
region.cursor.max.y = region.max_rect.max.y;
|
||||
}
|
||||
|
||||
/// Set the minimum width of the ui.
|
||||
|
|
|
|||
Loading…
Reference in New Issue