[apps/graph/list] Improve the drawRect of function cells

Change-Id: I2338151444e04f44e2b432ec8435ff63a2837fc9
This commit is contained in:
Émilie Feral
2016-09-23 14:03:05 +02:00
parent 4d4163f13b
commit 7efec4331d
5 changed files with 30 additions and 13 deletions

View File

@@ -3,6 +3,11 @@
#include <poincare.h>
#include <assert.h>
constexpr KDColor FunctionCell::k_evenLineBackgroundColor;
constexpr KDColor FunctionCell::k_oddLineBackgroundColor;
constexpr KDColor FunctionCell::k_selectedLineBackgroundColor;
constexpr KDColor FunctionCell::k_desactiveTextColor;
FunctionCell::FunctionCell() :
View(),
Responder(nullptr),
@@ -32,7 +37,7 @@ View * FunctionCell::subviewAtIndex(int index) {
}
void FunctionCell::layoutSubviews() {
m_functionNameView.setFrame(KDRect(0, 0, k_functionNameWidth, k_functionCellHeight));
m_functionExpressionView.setFrame(KDRect(k_functionNameWidth, 0, k_functionExpressionWidth, k_functionCellHeight));
m_functionExpressionView.setFrame(KDRect(k_functionNameWidth, 0, bounds().width()-k_functionNameWidth, k_functionCellHeight));
}