[apps/graph] make the function title cells consistent

Change-Id: Ib59f3d5f8a679cddd8a88e16711138425a6e9ecb
This commit is contained in:
Émilie Feral
2016-10-24 16:07:28 +02:00
parent b101308922
commit b56d88cefa
17 changed files with 139 additions and 193 deletions

View File

@@ -384,13 +384,16 @@ void ValuesController::willDisplayCellAtLocation(View * cell, int i, int j) {
}
FunctionTitleCell * myFunctionCell = (FunctionTitleCell *)cell;
Function * function = functionAtColumn(i);
char bufferName[6] = "f'(x)";
bufferName[1] = *function->name();
myFunctionCell->setText(bufferName + 1);
myFunctionCell->setColor(function->color());
myFunctionCell->setOrientation(FunctionTitleCell::Orientation::HorizontalIndicator);
if (isDerivativeColumn(i)) {
myFunctionCell->setDerivative(true);
} else {
myFunctionCell->setDerivative(false);
bufferName[0] = bufferName[1];
bufferName[1] = '\'';
myFunctionCell->setText(bufferName);
}
myFunctionCell->setText(function->name(), function->color());
return;
}
// The cell is a value cell: