From d34fd5dc2b8d403d348b772b54e70a470bca37af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vuka=C5=A1in=20Vojinovi=C4=87?= Date: Tue, 5 Nov 2024 14:16:45 +0100 Subject: [PATCH] fix: apply content padding only when content_container is true --- src/app/mod.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/app/mod.rs b/src/app/mod.rs index 8554c8b3..bfc65c19 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -702,6 +702,11 @@ impl ApplicationExt for App { let focused = core .focused_window() .is_some_and(|i| Some(i) == self.core().main_window_id()); + let main_content_padding = if core.window.content_container { + [0, 8, 8, 8] + } else { + [0, 0, 0, 0] + }; let content_row = crate::widget::row::with_children({ let mut widgets = Vec::with_capacity(4); @@ -745,13 +750,13 @@ impl ApplicationExt for App { } else { //TODO: container and padding are temporary, until //the `resize_border` is moved to not cover window content - widgets.push(container(main_content).padding([0, 8, 8, 8]).into()); + widgets.push(container(main_content).padding(main_content_padding).into()); } } else { //TODO: hide content when out of space //TODO: container and padding are temporary, until //the `resize_border` is moved to not cover window content - widgets.push(container(main_content).padding([0, 8, 8, 8]).into()); + widgets.push(container(main_content).padding(main_content_padding).into()); if let Some(context) = self.context_drawer() { widgets.push( crate::widget::ContextDrawer::new_inner(