[apps/graph/list] make the class function cell inherits from even odd cell class

Change-Id: I8c786d76c7be726b2672713a5150dce5abb12061
This commit is contained in:
Émilie Feral
2016-10-07 13:57:23 +02:00
parent 72f9fa9bd5
commit c3524fa287
6 changed files with 15 additions and 51 deletions

View File

@@ -6,10 +6,9 @@ FunctionExpressionView::FunctionExpressionView() :
}
void FunctionExpressionView::drawRect(KDContext * ctx, KDRect rect) const {
EvenOddCell::drawRect(ctx, rect);
// Select the background color according to the even line and the cursor selection
KDColor background = m_even ? FunctionCell::k_evenLineBackgroundColor : FunctionCell::k_oddLineBackgroundColor;
background = m_highlighted ? FunctionCell::k_selectedLineBackgroundColor : background;
ctx->fillRect(rect, background);
KDColor background = backgroundColor();
// Select text color according to the state of the function
bool active = m_function->isActive();
KDColor text = active ? KDColorBlack : FunctionCell::k_desactiveTextColor;