1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 05:40:03 -04:00

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

This reverts commit 4bbdab1788.
This commit is contained in:
Konkitoman
2023-08-24 07:55:56 +03:00
parent c9faa78e5b
commit 9c73c2f4b1
15 changed files with 34 additions and 47 deletions

View File

@@ -51,8 +51,6 @@ impl eframe::App for App {
"Current Parent Viewport Id: {}",
ctx.get_viewport_id()
));
ui.label(format!("Pos: {:?}", ctx.screen_rect().min));
ui.label(format!("Size: {:?}", ctx.screen_rect().max));
ui.label("Look at the \"Frame: \" will tell you, what viewport is rendering!");
{
let mut force_embedding = ctx.force_embedding();
@@ -335,8 +333,6 @@ impl eframe::App for App {
"Current Parent Viewport Id: {}",
ctx.get_viewport_id()
));
ui.label(format!("Pos: {:?}", ctx.screen_rect().min));
ui.label(format!("Size: {:?}", ctx.screen_rect().max));
ui.label(format!("Count: {state}"));
if ui.button("Add").clicked() {
*state += 1;
@@ -350,13 +346,8 @@ impl eframe::App for App {
.default_embedded(false)
.show(ctx, |ui| {
ui.label(format!("Frame: {}", ui.ctx().frame_nr()));
ui.label(format!("Frame: {}", ctx.frame_nr()));
ui.label(format!("Current Viewport Id: {}", ctx.get_viewport_id()));
ui.label(format!(
"Current Parent Viewport Id: {}",
ctx.get_viewport_id()
));
ui.label(format!("Pos: {:?}", ctx.screen_rect().min));
ui.label(format!("Size: {:?}", ctx.screen_rect().max));
ui.label(format!("Count: {}", self.sync_window_state));
if ui.button("Add").clicked() {
self.sync_window_state += 1;