mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 06:40:06 -04:00
Add Area::constrain_to and Window::constrain_to (#3396)
* Rename `drag_bounds` to `constrain_to` and allow turning off constraining for `Window`s * Constrain DatePicker popup to screen * Fix typo
This commit is contained in:
@@ -117,6 +117,7 @@ impl<'a> Widget for DatePickerButton<'a> {
|
||||
} = Area::new(ui.make_persistent_id(self.id_source))
|
||||
.order(Order::Foreground)
|
||||
.fixed_pos(pos)
|
||||
.constrain_to(ui.ctx().screen_rect())
|
||||
.show(ui.ctx(), |ui| {
|
||||
let frame = Frame::popup(ui.style());
|
||||
frame
|
||||
|
||||
Reference in New Issue
Block a user