2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 23:07:42 +00:00

Fixed Toolbar on top of space

This commit is contained in:
Jack Andersen
2015-12-04 19:57:51 -10:00
parent 0f4c689545
commit fc67d86b29
5 changed files with 36 additions and 30 deletions

View File

@@ -126,12 +126,17 @@ void Space::resized(const boo::SWindowRect& root, const boo::SWindowRect& sub)
View::resized(root, sub);
boo::SWindowRect tbRect = sub;
tbRect.size[1] = m_toolbar->gauge();
tbRect.size[1] = m_toolbar->nominalHeight();
if (m_tbPos == Toolbar::Position::Top)
tbRect.location[1] += sub.size[1] - tbRect.size[1];
m_toolbar->resized(root, tbRect);
if (m_contentView)
{
tbRect.location[1] += tbRect.size[1];
if (m_tbPos == Toolbar::Position::Top)
tbRect.location[1] = sub.location[1];
else
tbRect.location[1] += tbRect.size[1];
tbRect.size[1] = sub.size[1] - tbRect.size[1];
tbRect.size[1] = std::max(tbRect.size[1], 0);
m_contentView->resized(root, tbRect);