[apps/sequence|graph|calculation] ADd a margin in edited text fields

Change-Id: I5450720bc0d58bceb8ab490d4fb837b4d79eef73
This commit is contained in:
Émilie Feral
2017-05-10 15:36:58 +02:00
parent d190f2724f
commit 3e3df48051
8 changed files with 24 additions and 5 deletions

View File

@@ -41,7 +41,7 @@ View * FunctionExpressionCell::subviewAtIndex(int index) {
}
void FunctionExpressionCell::layoutSubviews() {
KDRect expressionFrame(k_separatorThickness, 0, bounds().width() - k_separatorThickness, bounds().height()-k_separatorThickness);
KDRect expressionFrame(k_separatorThickness+k_margin, 0, bounds().width() - k_separatorThickness-k_margin, bounds().height()-k_separatorThickness);
m_expressionView.setFrame(expressionFrame);
}
@@ -51,6 +51,8 @@ void FunctionExpressionCell::drawRect(KDContext * ctx, KDRect rect) const {
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);
// Color the margin
ctx->fillRect(KDRect(k_separatorThickness, 0, k_margin, bounds().height()-k_separatorThickness), backgroundColor());
}
}