[escher] In palette, improve colors

Change-Id: I2c8f33764cf2befeb994b9b47b46d39f116ae96c
This commit is contained in:
Émilie Feral
2017-01-23 17:58:11 +01:00
parent f7f8430288
commit d45000b3d9
26 changed files with 111 additions and 98 deletions

View File

@@ -3,8 +3,8 @@
VariableBoxLeafCell::VariableBoxLeafCell() :
TableViewCell(),
m_labelView(BufferTextView(KDText::FontSize::Small, 0, 0.5, KDColorBlack, Palette::CellBackgroundColor)),
m_subtitleView(BufferTextView(KDText::FontSize::Small, 0, 0.5, Palette::DesactiveTextColor, Palette::CellBackgroundColor)),
m_labelView(BufferTextView(KDText::FontSize::Small, 0, 0.5, KDColorBlack, KDColorWhite)),
m_subtitleView(BufferTextView(KDText::FontSize::Small, 0, 0.5, Palette::GreyDark, KDColorWhite)),
m_displayExpression(false)
{
}
@@ -49,7 +49,7 @@ void VariableBoxLeafCell::layoutSubviews() {
void VariableBoxLeafCell::reloadCell() {
TableViewCell::reloadCell();
KDColor backgroundColor = isHighlighted()? Palette::FocusCellBackgroundColor : Palette::CellBackgroundColor;
KDColor backgroundColor = isHighlighted()? Palette::Select : KDColorWhite;
m_labelView.setBackgroundColor(backgroundColor);
m_subtitleView.setBackgroundColor(backgroundColor);
m_expressionView.setBackgroundColor(backgroundColor);
@@ -71,9 +71,9 @@ void VariableBoxLeafCell::setExpression(ExpressionLayout * expressionLayout) {
void VariableBoxLeafCell::drawRect(KDContext * ctx, KDRect rect) const {
KDCoordinate width = bounds().width();
KDCoordinate height = bounds().height();
KDColor backgroundColor = isHighlighted() ? Palette::FocusCellBackgroundColor : Palette::CellBackgroundColor;
KDColor backgroundColor = isHighlighted() ? Palette::Select : KDColorWhite;
ctx->fillRect(KDRect(1, 0, width-2, height-1), backgroundColor);
ctx->fillRect(KDRect(0, height-1, width, 1), Palette::LineColor);
ctx->fillRect(KDRect(0, 0, 1, height-1), Palette::LineColor);
ctx->fillRect(KDRect(width-1, 0, 1, height-1), Palette::LineColor);
ctx->fillRect(KDRect(0, height-1, width, 1), Palette::GreyBright);
ctx->fillRect(KDRect(0, 0, 1, height-1), Palette::GreyBright);
ctx->fillRect(KDRect(width-1, 0, 1, height-1), Palette::GreyBright);
}