demo app: add buttons to toggle window decorations on/off
This commit is contained in:
parent
0bfcc35acf
commit
9ae7762029
1 changed files with 15 additions and 4 deletions
|
@ -134,14 +134,25 @@ impl BackendPanel {
|
|||
}
|
||||
}
|
||||
|
||||
if !frame.is_web()
|
||||
&& ui
|
||||
if !frame.is_web() {
|
||||
ui.horizontal(|ui| {
|
||||
ui.label("Window decorations:");
|
||||
if ui.button("Show").clicked() {
|
||||
frame.set_decorations(true);
|
||||
}
|
||||
if ui.button("Hide").clicked() {
|
||||
frame.set_decorations(false);
|
||||
}
|
||||
});
|
||||
|
||||
if ui
|
||||
.button("📱 Phone Size")
|
||||
.on_hover_text("Resize the window to be small like a phone.")
|
||||
.clicked()
|
||||
{
|
||||
frame.set_window_size(egui::Vec2::new(375.0, 812.0)); // iPhone 12 mini
|
||||
}
|
||||
}
|
||||
|
||||
ui.separator();
|
||||
|
||||
|
|
Loading…
Reference in a new issue