From be1fdc3e3bbc02a44fd86ad9b39e8c3f379a31ca Mon Sep 17 00:00:00 2001 From: genusistimelord Date: Wed, 21 Feb 2024 08:47:22 -0500 Subject: [PATCH] Added Tabs Height to the offsets of the content layout --- src/core/alignment.rs | 1 + src/native/tabs.rs | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/core/alignment.rs b/src/core/alignment.rs index 8ca3e6af..6a5cfe8f 100644 --- a/src/core/alignment.rs +++ b/src/core/alignment.rs @@ -9,6 +9,7 @@ /// |BottomStart| Bottom | BottomEnd | /// +-----------+-----------+-----------+ /// ``` + #[allow(missing_docs)] #[derive(Debug, Clone, PartialEq, Eq)] pub enum Alignment { diff --git a/src/native/tabs.rs b/src/native/tabs.rs index 134918fe..9488c534 100644 --- a/src/native/tabs.rs +++ b/src/native/tabs.rs @@ -325,7 +325,10 @@ where self.tab_bar .layout(&mut tree.children[0], renderer, &tab_bar_limits); - let tab_content_limits = limits.width(self.width).height(self.height); + let tab_content_limits = limits + .width(self.width) + .height(self.height) + .shrink([0.0, tab_bar_node.size().height]); let mut tab_content_node = if let Some(element) = self.tabs.get(self.tab_bar.get_active_tab_idx()) { @@ -348,7 +351,7 @@ where + match self.tab_bar_position { TabBarPosition::Top => 0.0, TabBarPosition::Bottom => { - tab_content_node.bounds().height - tab_bar_bounds.height + tab_content_node.bounds().height } }, ));