[escher] suppress the drawing of the first controller of a stack controller

Change-Id: I8d4efaea268a24ec731e8db5cc43abd172c7ead0
This commit is contained in:
Émilie Feral
2016-09-16 10:35:14 +02:00
parent 6917b2c534
commit 8558d1f4de

View File

@@ -30,11 +30,11 @@ void StackViewController::ControllerView::popStack() {
void StackViewController::ControllerView::layoutSubviews() {
KDCoordinate stackHeight = 20;
KDCoordinate width = m_frame.width();
for (int i=0; i<m_numberOfStacks; i++) {
m_stackViews[i].setFrame(KDRect(0, stackHeight*i, width, stackHeight));
for (int i=1; i<m_numberOfStacks; i++) {
m_stackViews[i].setFrame(KDRect(0, stackHeight*(i-1), width, stackHeight));
}
if (m_contentView) {
KDRect contentViewFrame = KDRect( 0, m_numberOfStacks*stackHeight,
KDRect contentViewFrame = KDRect( 0, (m_numberOfStacks-1)*stackHeight,
width, m_frame.height() - m_numberOfStacks*stackHeight);
m_contentView->setFrame(contentViewFrame);
}