[apps/sequence/list] Improve cell rendering

Change-Id: I64e713a3beae2574593f96fa05717f346e5ffd07
This commit is contained in:
Émilie Feral
2017-02-16 14:43:58 +01:00
parent 51c33b0a5b
commit 5c8b5492e8
5 changed files with 11 additions and 4 deletions

View File

@@ -39,13 +39,16 @@ View * FunctionExpressionCell::subviewAtIndex(int index) {
}
void FunctionExpressionCell::layoutSubviews() {
KDRect expressionFrame(k_separatorThickness, 0, bounds().width() - k_separatorThickness, bounds().height());
KDRect expressionFrame(k_separatorThickness, 0, bounds().width() - k_separatorThickness, bounds().height()-k_separatorThickness);
m_expressionView.setFrame(expressionFrame);
}
void FunctionExpressionCell::drawRect(KDContext * ctx, KDRect rect) const {
// Color the separator
KDColor separatorColor = m_even ? Palette::WallScreen : KDColorWhite;
// Color the vertical separator
ctx->fillRect(KDRect(0, 0, k_separatorThickness, bounds().height()), Palette::GreyBright);
// Color the horizontal separator
ctx->fillRect(KDRect(k_separatorThickness, bounds().height()-k_separatorThickness, bounds().width()-k_separatorThickness, k_separatorThickness), separatorColor);
}
}