[escher] Correct layout metrics

Change-Id: I829d387885af23be3782b99926c09547219ba6cc
This commit is contained in:
Émilie Feral
2017-01-26 10:42:45 +01:00
parent 7fe4d497f3
commit 6ef76341aa
11 changed files with 16 additions and 18 deletions

View File

@@ -17,18 +17,16 @@ void TabViewController::ContentView::setActiveView(View * view) {
}
void TabViewController::ContentView::layoutSubviews() {
KDCoordinate tabHeight = 20;
KDRect tabViewFrame = KDRect(
0, 0,
m_frame.width(), tabHeight
m_frame.width(), k_tabHeight
);
m_tabView.setFrame(tabViewFrame);
if (m_activeView) {
KDRect activeViewFrame = KDRect(
0, tabHeight,
0, k_tabHeight,
m_frame.width(),
m_frame.height() - tabHeight
m_frame.height() - k_tabHeight
);
m_activeView->setFrame(activeViewFrame);
}