From 080976288abe8416faed0446a84fe4894fa19c8a Mon Sep 17 00:00:00 2001 From: Muhammad Nauman Raza Date: Sun, 3 Dec 2023 12:41:31 +0000 Subject: [PATCH] chore: improve scaling of UI by adding a space Former-commit-id: 244390f855fe9f7614767b25c47bbce74118e985 --- src/main.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 9036a26..d1befab 100644 --- a/src/main.rs +++ b/src/main.rs @@ -134,11 +134,16 @@ fn render_ui(mut contexts: EguiContexts, mut windows: Query<&mut Window>, mut ui .desired_width(window_width / 4.) .show(ui); - // Manually add some space between the heading and the text inputs - ui.add_space(window_height / 20.); + // Manually add some space between the text inputs and the 'confirm' button + ui.add_space(window_height / 26.); let button = ui.add(egui::Button::new("Confirm") .fill(black)); + + // Manually add some space between the button and the bottom border of the + // window...for scaling purposes + ui.add_space(window_height / 22.); + }); }); }