1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-03 15:20:05 -04:00

Now in screen_rect min is the viewport position and max is the viewport size

This commit is contained in:
Konkitoman
2023-08-12 20:36:41 +03:00
parent 622814d8ed
commit 4bbdab1788
15 changed files with 48 additions and 28 deletions

View File

@@ -116,6 +116,6 @@ fn test_egui_zero_window_size() {
/// Detect narrow screens. This is used to show a simpler UI on mobile devices,
/// especially for the web demo at <https://egui.rs>.
pub fn is_mobile(ctx: &egui::Context) -> bool {
let screen_size = ctx.screen_rect().size();
let screen_size = ctx.screen_rect().max;
screen_size.x < 550.0
}