mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
eframe: add set_minimized and set_maximized (#2292)
* add actions for window controls
* add maximized to WindowInfo
update button text
fix clippy
* add overlap icon when maximized
* remove argument `app`
* remove WindowInfo { maximized }
* Update minimum window size
* Double-click titlebar to toggle maximized state
---------
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
This commit is contained in:
@@ -207,6 +207,8 @@ pub fn handle_app_output(
|
||||
window_pos,
|
||||
visible: _, // handled in post_present
|
||||
always_on_top,
|
||||
minimized,
|
||||
maximized,
|
||||
} = app_output;
|
||||
|
||||
if let Some(decorated) = decorated {
|
||||
@@ -250,6 +252,14 @@ pub fn handle_app_output(
|
||||
WindowLevel::Normal
|
||||
});
|
||||
}
|
||||
|
||||
if let Some(minimized) = minimized {
|
||||
window.set_minimized(minimized);
|
||||
}
|
||||
|
||||
if let Some(maximized) = maximized {
|
||||
window.set_maximized(maximized);
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user