[apps/graph] ValuesController: column width are different for parametric

functions
This commit is contained in:
Émilie Feral
2019-09-24 17:32:42 +02:00
committed by LeaNumworks
parent bf23e0f8da
commit 00bb1b7ac1
6 changed files with 49 additions and 29 deletions

View File

@@ -136,30 +136,6 @@ void ValuesController::willDisplayCellAtLocation(HighlightCell * cell, int i, in
}
}
KDCoordinate ValuesController::columnWidth(int i) {
switch (i) {
case 0:
return k_abscissaCellWidth;
default:
return k_ordinateCellWidth;
}
}
KDCoordinate ValuesController::cumulatedWidthFromIndex(int i) {
if (i == 0) {
return 0;
} else {
return k_abscissaCellWidth + (i-1)*k_ordinateCellWidth;
}
}
int ValuesController::indexFromCumulatedWidth(KDCoordinate offsetX) {
if (offsetX <= k_abscissaCellWidth) {
return 0;
}
return (offsetX - k_abscissaCellWidth)/k_ordinateCellWidth+1;
}
HighlightCell * ValuesController::reusableCell(int index, int type) {
assert(0 <= index && index < reusableCellCount(type));
switch (type) {