Fixed some conflicts

This commit is contained in:
Quentin Guidée
2020-02-12 17:42:58 +01:00
687 changed files with 13048 additions and 4057 deletions

View File

@@ -6,7 +6,7 @@
namespace Probability {
ParametersController::ContentView::ContentView(Responder * parentResponder, SelectableTableView * selectableTableView) :
ParametersController::ContentView::ContentView(SelectableTableView * selectableTableView) :
m_numberOfParameters(1),
m_titleView(KDFont::SmallFont, I18n::Message::ChooseParameters, 0.5f, 0.5f, Palette::SecondaryText, Palette::BackgroundApps),
m_firstParameterDefinition(KDFont::SmallFont, (I18n::Message)0, 0.5f, 0.5f, Palette::PrimaryText, Palette::BackgroundApps),
@@ -50,26 +50,26 @@ View * ParametersController::ContentView::subviewAtIndex(int index) {
return &m_secondParameterDefinition;
}
void ParametersController::ContentView::layoutSubviews() {
void ParametersController::ContentView::layoutSubviews(bool force) {
KDCoordinate titleHeight = KDFont::SmallFont->glyphSize().height()+k_titleMargin;
m_titleView.setFrame(KDRect(0, 0, bounds().width(), titleHeight));
m_titleView.setFrame(KDRect(0, 0, bounds().width(), titleHeight), force);
KDCoordinate tableHeight = m_selectableTableView->minimalSizeForOptimalDisplay().height();
m_selectableTableView->setFrame(KDRect(0, titleHeight, bounds().width(), tableHeight));
m_selectableTableView->setFrame(KDRect(0, titleHeight, bounds().width(), tableHeight), force);
KDCoordinate textHeight = KDFont::SmallFont->glyphSize().height();
KDCoordinate defOrigin = (titleHeight+tableHeight)/2+(bounds().height()-textHeight)/2;
m_secondParameterDefinition.setFrame(KDRectZero);
m_secondParameterDefinition.setFrame(KDRectZero, force);
if (m_numberOfParameters == 2) {
defOrigin = (titleHeight+tableHeight)/2+(bounds().height()-2*textHeight-k_textMargin)/2;
m_secondParameterDefinition.setFrame(KDRect(0, defOrigin+textHeight+k_textMargin, bounds().width(), textHeight));
m_secondParameterDefinition.setFrame(KDRect(0, defOrigin+textHeight+k_textMargin, bounds().width(), textHeight), force);
}
m_firstParameterDefinition.setFrame(KDRect(0, defOrigin, bounds().width(), textHeight));
m_firstParameterDefinition.setFrame(KDRect(0, defOrigin, bounds().width(), textHeight), force);
}
/* Parameters Controller */
ParametersController::ParametersController(Responder * parentResponder, InputEventHandlerDelegate * inputEventHandlerDelegate, Distribution * distribution, CalculationController * calculationController) :
FloatParameterController(parentResponder),
m_contentView(this, &m_selectableTableView),
m_contentView(&m_selectableTableView),
m_menuListCell{},
m_distribution(distribution),
m_calculationController(calculationController)