Skip to content

Commit

Permalink
[SUTK] TabBar size fix; and intermittent crash fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ravi688 committed Jan 6, 2025
1 parent c4004c6 commit 4aac73e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sutk/source/NotebookView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ namespace SUTK
m_tabBarContainer = driver.createContainer<ScrollContainer>(m_tabBarBGPanel);
m_tabBarContainer->alwaysFitInParent();
m_tabBar = driver.createContainer<ScrollableTabBar>(m_tabBarContainer);
m_tabBar->alwaysFitInParent();
m_tabBar->fitInParent();
// The height of the tabBar must match with that of its parent (The ScrollContainer)
m_tabBar->getAnchorRect()->setRect({ 0, 0, 0, 1 });

m_tabAnimGroup = driver.getAnimationEngine().createAnimGroup<TabAnimGroup>(this);
m_tabShiftAnimGroup = driver.getAnimationEngine().createAnimGroup<TabShiftAnimGroup>(this);
Expand Down Expand Up @@ -492,7 +494,7 @@ namespace SUTK
m_tabBar->unlockLayout(true);
}

TabBar::TabBar(UIDriver& driver, Container* parent) noexcept : HBoxContainer(driver, parent), m_root(com::null_pointer<Tab>())
TabBar::TabBar(UIDriver& driver, Container* parent) noexcept : HBoxContainer(driver, parent), m_root(com::null_pointer<Tab>()), m_selectedTab(com::null_pointer<Tab>())
{
}

Expand Down

0 comments on commit 4aac73e

Please sign in to comment.