From 25244d632e5283890643b5a7b53989abdb035ba9 Mon Sep 17 00:00:00 2001 From: Ilya Zlobintsev Date: Thu, 5 Jan 2023 09:56:56 +0200 Subject: [PATCH] fix: alignment --- lact-gui/src/app/root_stack/mod.rs | 2 +- lact-gui/src/app/root_stack/oc_page/power_cap_frame.rs | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lact-gui/src/app/root_stack/mod.rs b/lact-gui/src/app/root_stack/mod.rs index 94a9bd4f..c4c9bbe3 100644 --- a/lact-gui/src/app/root_stack/mod.rs +++ b/lact-gui/src/app/root_stack/mod.rs @@ -21,7 +21,7 @@ pub struct RootStack { impl RootStack { pub fn new() -> Self { - let container = Stack::new(); + let container = Stack::builder().vexpand(true).build(); let info_page = InformationPage::new(); diff --git a/lact-gui/src/app/root_stack/oc_page/power_cap_frame.rs b/lact-gui/src/app/root_stack/oc_page/power_cap_frame.rs index fa9e1596..aa5233e2 100644 --- a/lact-gui/src/app/root_stack/oc_page/power_cap_frame.rs +++ b/lact-gui/src/app/root_stack/oc_page/power_cap_frame.rs @@ -35,7 +35,11 @@ impl PowerCapFrame { }); } - let scale = Scale::new(Orientation::Horizontal, Some(&adjustment)); + let scale = Scale::builder() + .orientation(Orientation::Horizontal) + .adjustment(&adjustment) + .hexpand(true) + .build(); scale.set_draw_value(false);