diff --git a/lib/I18n/translations/english.yaml b/lib/I18n/translations/english.yaml index b6623899..df5f893f 100644 --- a/lib/I18n/translations/english.yaml +++ b/lib/I18n/translations/english.yaml @@ -63,6 +63,7 @@ STR_CAT_CONTROLS: "Controls" STR_CAT_SYSTEM: "System" STR_SLEEP_SCREEN: "Sleep Screen" STR_SLEEP_COVER_MODE: "Sleep Screen Cover Mode" +STR_SLEEP_ORIENTATION: "Sleep Screen Orientation" STR_HIDE_BATTERY: "Hide Battery %" STR_EXTRA_SPACING: "Extra Paragraph Spacing" STR_TEXT_AA: "Text Anti-Aliasing" diff --git a/src/CrossPointSettings.h b/src/CrossPointSettings.h index 01d7cc56..2a488133 100644 --- a/src/CrossPointSettings.h +++ b/src/CrossPointSettings.h @@ -153,6 +153,8 @@ class CrossPointSettings { uint8_t sleepScreenCoverMode = FIT; // Sleep screen cover filter uint8_t sleepScreenCoverFilter = NO_FILTER; + // Sleep screen orientation + uint8_t sleepScreenOrientation = PORTRAIT; // Status bar settings (statusBar retained for migration only) uint8_t statusBar = FULL; uint8_t statusBarChapterPageCount = 1; diff --git a/src/SettingsList.h b/src/SettingsList.h index bbe9a774..d28b7c35 100644 --- a/src/SettingsList.h +++ b/src/SettingsList.h @@ -22,6 +22,9 @@ inline const std::vector& getSettingsList() { "sleepScreen", StrId::STR_CAT_DISPLAY), SettingInfo::Enum(StrId::STR_SLEEP_COVER_MODE, &CrossPointSettings::sleepScreenCoverMode, {StrId::STR_FIT, StrId::STR_CROP}, "sleepScreenCoverMode", StrId::STR_CAT_DISPLAY), + SettingInfo::Enum(StrId::STR_SLEEP_ORIENTATION, &CrossPointSettings::sleepScreenOrientation, + {StrId::STR_PORTRAIT, StrId::STR_LANDSCAPE_CW, StrId::STR_INVERTED, StrId::STR_LANDSCAPE_CCW}, + "sleepScreenOrientation", StrId::STR_CAT_DISPLAY), SettingInfo::Enum(StrId::STR_SLEEP_COVER_FILTER, &CrossPointSettings::sleepScreenCoverFilter, {StrId::STR_NONE_OPT, StrId::STR_FILTER_CONTRAST, StrId::STR_INVERTED}, "sleepScreenCoverFilter", StrId::STR_CAT_DISPLAY), diff --git a/src/activities/boot_sleep/SleepActivity.cpp b/src/activities/boot_sleep/SleepActivity.cpp index 19f443b0..aed42879 100644 --- a/src/activities/boot_sleep/SleepActivity.cpp +++ b/src/activities/boot_sleep/SleepActivity.cpp @@ -22,11 +22,12 @@ void SleepActivity::onEnter() { if (APP_STATE.lastSleepFromReader) { ReaderUtils::applyOrientation(renderer, SETTINGS.orientation); GUI.drawPopup(renderer, tr(STR_ENTERING_SLEEP)); - renderer.setOrientation(GfxRenderer::Orientation::Portrait); } else { GUI.drawPopup(renderer, tr(STR_ENTERING_SLEEP)); } + ReaderUtils::applyOrientation(renderer, SETTINGS.sleepScreenOrientation); + switch (SETTINGS.sleepScreen) { case (CrossPointSettings::SLEEP_SCREEN_MODE::BLANK): return renderBlankSleepScreen();