[apps/code] Fix varbox row height

This commit is contained in:
Léa Saviot
2020-04-10 17:01:36 +02:00
committed by Émilie Feral
parent d5e1e620fd
commit 1d416b3299

View File

@@ -75,9 +75,15 @@ void VariableBoxController::didEnterResponderChain(Responder * previousFirstResp
}
KDCoordinate VariableBoxController::rowHeight(int j) {
int cellType = typeAndOriginAtLocation(j);
NodeOrigin cellOrigin = NodeOrigin::CurrentScript;
int cumulatedOriginsCount = 0;
int cellType = typeAndOriginAtLocation(j, &cellOrigin, &cumulatedOriginsCount);
if (cellType == k_itemCellType) {
return k_simpleItemRowHeight; // TODO LEA
//TODO LEA if cellOrigin == Imported?
if (scriptNodeAtIndex(j - cumulatedOriginsCount)->description() != nullptr) {
return k_complexItemRowHeight;
}
return k_simpleItemRowHeight;
}
assert(cellType == k_subtitleCellType);
return k_subtitleRowHeight;