[apps/settings] Writing format submenu has slightly bigger rows

So that the edition2D layout fits better
This commit is contained in:
Léa Saviot
2018-11-15 11:23:24 +01:00
committed by EmilieNumworks
parent 266cc79d32
commit 4e5bf5db2f
2 changed files with 7 additions and 0 deletions

View File

@@ -108,6 +108,12 @@ void PreferencesController::willDisplayCellForIndex(HighlightCell * cell, int in
myCell->setLayout(layoutForPreferences(m_messageTreeModel->children(index)->label()));
}
KDCoordinate PreferencesController::rowHeight(int j) {
/* We cheat for the Writing format subcontroller, because the Edition2D layout
* needs more vertical space. */
return GenericSubController::rowHeight(j) + (m_messageTreeModel->label() == I18n::Message::EditionMode ? 2 : 0);
}
void PreferencesController::setPreferenceWithValueIndex(I18n::Message message, int valueIndex) {
Preferences * preferences = Preferences::sharedPreferences();
if (message == I18n::Message::AngleUnit) {

View File

@@ -13,6 +13,7 @@ public:
HighlightCell * reusableCell(int index, int type) override;
int reusableCellCount(int type) override;
void willDisplayCellForIndex(HighlightCell * cell, int index) override;
KDCoordinate rowHeight(int j) override;
protected:
constexpr static int k_totalNumberOfCell = 2;
private: