Files
Upsilon/apps/graph/list/function_expression_view.cpp
Émilie Feral c3524fa287 [apps/graph/list] make the class function cell inherits from even odd cell class
Change-Id: I8c786d76c7be726b2672713a5150dce5abb12061
2016-10-11 10:31:50 +02:00

17 lines
598 B
C++

#include "function_expression_view.h"
FunctionExpressionView::FunctionExpressionView() :
FunctionCell()
{
}
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 = backgroundColor();
// Select text color according to the state of the function
bool active = m_function->isActive();
KDColor text = active ? KDColorBlack : FunctionCell::k_desactiveTextColor;
m_function->layout()->draw(ctx, KDPointZero, text, background);
}