Skip to content

Commit

Permalink
Added Tabs Height to the offsets of the content layout
Browse files Browse the repository at this point in the history
  • Loading branch information
genusistimelord committed Feb 21, 2024
1 parent ed59455 commit be1fdc3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/core/alignment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/// |BottomStart| Bottom | BottomEnd |
/// +-----------+-----------+-----------+
/// ```

#[allow(missing_docs)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum Alignment {
Expand Down
7 changes: 5 additions & 2 deletions src/native/tabs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand All @@ -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
}
},
));
Expand Down

0 comments on commit be1fdc3

Please sign in to comment.