[apps/reg] Calculation column size depends on regression type

This commit is contained in:
Léa Saviot
2018-06-13 15:55:48 +02:00
committed by Émilie Feral
parent 42982cb078
commit 428b60771b
2 changed files with 14 additions and 3 deletions

View File

@@ -230,7 +230,17 @@ void CalculationController::willDisplayCellAtLocation(HighlightCell * cell, int
}
KDCoordinate CalculationController::columnWidth(int i) {
return i == 0 ? k_calculationTitleCellWidth : k_calculationCellWidth;
if (i == 0) {
return k_smallCalculationCellWidth;
}
Model::Type currentType = m_store->seriesRegressionType(m_store->indexOfKthNonEmptySeries(i-1));
if (currentType == Model::Type::Quartic) {
return k_quarticCalculationCellWidth;
}
if (currentType == Model::Type::Cubic) {
return k_cubicCalculationCellWidth;
}
return k_smallCalculationCellWidth;
}
KDCoordinate CalculationController::rowHeight(int j) {