mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/shared] Improve perf of values controller
Change-Id: I22b0f81c59d06bb8fa58de7f8958a20e0bcf53b0
This commit is contained in:
@@ -165,13 +165,8 @@ KDCoordinate ValuesController::cumulatedWidthFromIndex(int i) {
|
||||
int ValuesController::indexFromCumulatedWidth(KDCoordinate offsetX) {
|
||||
if (offsetX <= k_abscissaCellWidth) {
|
||||
return 0;
|
||||
} else {
|
||||
int index = 0;
|
||||
while ((k_abscissaCellWidth+index*k_ordinateCellWidth) <= offsetX) {
|
||||
index++;
|
||||
}
|
||||
return index;
|
||||
}
|
||||
return (offsetX - k_abscissaCellWidth)/k_ordinateCellWidth+1;
|
||||
}
|
||||
|
||||
HighlightCell * ValuesController::reusableCell(int index, int type) {
|
||||
|
||||
Reference in New Issue
Block a user