More fixes
This commit is contained in:
@@ -97,7 +97,8 @@ void SettingsActivity::onEnter() {
|
||||
continue;
|
||||
}
|
||||
const bool isReaderFontEntry =
|
||||
enriched.category == StrId::STR_CAT_READER && enriched.submenu == StrId::STR_MENU_READER_FONT;
|
||||
enriched.category == StrId::STR_CAT_READER &&
|
||||
(enriched.submenu == StrId::STR_MENU_READER_FONT || enriched.submenu == StrId::STR_MENU_TXT_FONT);
|
||||
|
||||
if (!insertedFontDownload && sawReaderFontSection && !isReaderFontEntry) {
|
||||
insertFontDownloadBelowFontSection();
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <I18n.h>
|
||||
|
||||
#include "CrossPointSettings.h"
|
||||
#include "FontSelectionActivity.h"
|
||||
#include "MappedInputManager.h"
|
||||
#include "SettingActionDispatch.h"
|
||||
#include "components/UITheme.h"
|
||||
@@ -22,6 +23,26 @@ void SettingsSubmenuActivity::onActionSelected(int index) {
|
||||
const auto& setting = menuItems[index];
|
||||
if (setting.isSeparator) return;
|
||||
|
||||
if (setting.type == SettingType::ENUM && setting.nameId == StrId::STR_FONT_FAMILY) {
|
||||
startActivityForResult(
|
||||
std::make_unique<FontSelectionActivity>(renderer, mappedInput, FontSelectionActivity::Target::EPUB),
|
||||
[this](const ActivityResult&) {
|
||||
SETTINGS.saveToFile();
|
||||
needsHalfRefresh = true;
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (setting.type == SettingType::ENUM && setting.nameId == StrId::STR_TXT_FONT_FAMILY) {
|
||||
startActivityForResult(
|
||||
std::make_unique<FontSelectionActivity>(renderer, mappedInput, FontSelectionActivity::Target::TXT),
|
||||
[this](const ActivityResult&) {
|
||||
SETTINGS.saveToFile();
|
||||
needsHalfRefresh = true;
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (setting.type == SettingType::ACTION) {
|
||||
MenuResult menuResult;
|
||||
if (setting.action != SettingAction::None) {
|
||||
|
||||
Reference in New Issue
Block a user