[escher] improve stack view drawing

Change-Id: I76ec35c21c9d877c209ee51a4c843dbed7b773b0
This commit is contained in:
Émilie Feral
2016-11-10 18:02:35 +01:00
parent aa60dfff39
commit 6d880a0c4c
3 changed files with 29 additions and 8 deletions

View File

@@ -33,10 +33,11 @@ void StackViewController::ControllerView::layoutSubviews() {
KDCoordinate width = m_frame.width();
int indexFirstHeader = m_displayFirstStackHeader ? 0 : 1;
for (int i=indexFirstHeader; i<m_numberOfStacks; i++) {
m_stackViews[i].setFrame(KDRect(0, stackHeight*(i-indexFirstHeader), width, stackHeight));
m_stackViews[i].setFrame(KDRect(0, stackHeight*(i-indexFirstHeader), width, stackHeight + 1));
}
if (m_contentView) {
KDRect contentViewFrame = KDRect( 0, (m_numberOfStacks-indexFirstHeader)*stackHeight,
bool separatorHeight = m_displayFirstStackHeader + (m_numberOfStacks > 1);
KDRect contentViewFrame = KDRect( 0, (m_numberOfStacks-indexFirstHeader)*stackHeight + separatorHeight,
width, m_frame.height() - (m_numberOfStacks-indexFirstHeader)*stackHeight);
m_contentView->setFrame(contentViewFrame);
}