[apps/shared] Improve validate button rendering in float parameter

controllers

Change-Id: I58ccc4da68c83509fe734038781b971d2a8f74c6
This commit is contained in:
Émilie Feral
2017-03-13 10:15:19 +01:00
parent e7abdbe2e3
commit 9aa516fe5d
6 changed files with 54 additions and 5 deletions

View File

@@ -12,10 +12,10 @@ FloatParameterController::FloatParameterController(Responder * parentResponder,
ViewController(parentResponder),
m_selectableTableView(SelectableTableView(this, this, Metric::CommonTopMargin, Metric::CommonRightMargin,
Metric::CommonBottomMargin, Metric::CommonLeftMargin, this)),
m_okButton(Button(&m_selectableTableView, okButtonText, Invocation([](void * context, void * sender) {
m_okButton(ButtonWithSeparator(&m_selectableTableView, okButtonText, Invocation([](void * context, void * sender) {
FloatParameterController * parameterController = (FloatParameterController *) context;
parameterController->buttonAction();
}, this), KDText::FontSize::Large))
}, this)))
{
}
@@ -72,6 +72,9 @@ KDCoordinate FloatParameterController::rowHeight(int j) {
}
KDCoordinate FloatParameterController::cumulatedHeightFromIndex(int j) {
if (j == numberOfRows()) {
return j*Metric::ParameterCellHeight+k_buttonMargin;
}
return Metric::ParameterCellHeight*j;
}