[poincare] Start removing ExpressionLayout

This commit is contained in:
Léa Saviot
2018-07-03 17:33:06 +02:00
parent a5ebab4bc1
commit f579e95815
125 changed files with 494 additions and 359 deletions

View File

@@ -23,17 +23,18 @@ KDCoordinate ExpressionModelListController::expressionRowHeight(int j) {
return Metric::StoreRowHeight;
}
ExpressionModel * m = modelStore()->modelAtIndex(j);
if (m->layout() == nullptr) {
if (!m->layoutRef().isDefined()) {
return Metric::StoreRowHeight;
}
KDCoordinate modelSize = m->layout()->size().height();
KDCoordinate modelSize = m->layoutRef().layoutSize().height();
return modelSize + Metric::StoreRowHeight - KDText::charSize().height();
}
void ExpressionModelListController::willDisplayExpressionCellAtIndex(HighlightCell * cell, int j) {
EvenOddExpressionCell * myCell = (EvenOddExpressionCell *)cell;
ExpressionModel * m = modelStore()->modelAtIndex(j);
myCell->setExpressionLayout(m->layout());
myCell->setExpressionLayout(nullptr); //TODO
//myCell->setExpressionLayout(m->layout());
}
/* Responder */