Add paragraph alignment setting (justify/left/center/right) (#191)
## Summary * **What is the goal of this PR?** Add a new user setting for paragraph alignment, instead of hard-coding full justification. * **What changes are included?** One new line in the settings screen, with 4 options (justify/left/center/right). Default is justified since that's what it was already. I personally only wanted to disable justification and use "left", but I included the other options for completeness since they were already supported. ## Additional Context Tested on my X4 and looks as expected for each alignment. Co-authored-by: Maeve Andrews <maeve@git.mail.maeveandrews.com>
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
|
||||
// Define the static settings list
|
||||
namespace {
|
||||
constexpr int settingsCount = 11;
|
||||
constexpr int settingsCount = 12;
|
||||
const SettingInfo settingsList[settingsCount] = {
|
||||
// Should match with SLEEP_SCREEN_MODE
|
||||
{"Sleep Screen", SettingType::ENUM, &CrossPointSettings::sleepScreen, {"Dark", "Light", "Custom", "Cover"}},
|
||||
@@ -34,6 +34,10 @@ const SettingInfo settingsList[settingsCount] = {
|
||||
{"Bookerly", "Noto Sans", "Open Dyslexic"}},
|
||||
{"Reader Font Size", SettingType::ENUM, &CrossPointSettings::fontSize, {"Small", "Medium", "Large", "X Large"}},
|
||||
{"Reader Line Spacing", SettingType::ENUM, &CrossPointSettings::lineSpacing, {"Tight", "Normal", "Wide"}},
|
||||
{"Reader Paragraph Alignment",
|
||||
SettingType::ENUM,
|
||||
&CrossPointSettings::paragraphAlignment,
|
||||
{"Justify", "Left", "Center", "Right"}},
|
||||
{"Check for updates", SettingType::ACTION, nullptr, {}},
|
||||
};
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user