mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-04 22:57:50 +03:00
Initial push
This commit is contained in:
parent
a64a465f5b
commit
6791198522
@ -16,8 +16,12 @@ class CrossPointSettings {
|
||||
CrossPointSettings& operator=(const CrossPointSettings&) = delete;
|
||||
|
||||
// Should match with SettingsActivity text
|
||||
<<<<<<< HEAD
|
||||
enum SLEEP_SCREEN_MODE { DARK = 0, LIGHT = 1, CUSTOM = 2, COVER = 3, BLANK = 4 };
|
||||
enum SHOW_SLEEP_SCREEN { ALWAYS = 0, EXCEPT_TIMEOUT = 1, NEVER = 2 };
|
||||
=======
|
||||
enum SLEEP_SCREEN_MODE { DARK = 0, LIGHT = 1, CUSTOM = 2, COVER = 3, LAST_SCREEN = 4, BLANK = 5 };
|
||||
>>>>>>> cc60375 (Initial push)
|
||||
enum SLEEP_SCREEN_COVER_MODE { FIT = 0, CROP = 1 };
|
||||
|
||||
// Status bar display type enum
|
||||
|
||||
@ -37,6 +37,10 @@ void SleepActivity::onEnter() {
|
||||
return renderCoverSleepScreen();
|
||||
}
|
||||
|
||||
if (SETTINGS.sleepScreen == CrossPointSettings::SLEEP_SCREEN_MODE::LAST_SCREEN) {
|
||||
return renderLastScreenSleepScreen();
|
||||
}
|
||||
|
||||
renderDefaultSleepScreen();
|
||||
}
|
||||
|
||||
@ -278,9 +282,28 @@ void SleepActivity::renderCoverSleepScreen() const {
|
||||
}
|
||||
|
||||
void SleepActivity::renderLastScreenSleepScreen() const {
|
||||
<<<<<<< HEAD
|
||||
const auto pageHeight = renderer.getScreenHeight();
|
||||
|
||||
renderer.drawImage(MoonIcon, 48, pageHeight - 48, 48, 48);
|
||||
=======
|
||||
const int textWidth = renderer.getTextWidth(UI_12_FONT_ID, "SLEEPING...", EpdFontFamily::BOLD);
|
||||
constexpr int margin = 20;
|
||||
const int x = (renderer.getScreenWidth() - textWidth - margin * 2) / 2;
|
||||
const int w = textWidth + margin * 2;
|
||||
const int h = renderer.getLineHeight(UI_12_FONT_ID) + margin * 2;
|
||||
const int y = renderer.getScreenHeight() - h - margin;
|
||||
|
||||
renderer.fillRect(x - 5, y - 5, w + 10, h + 10, true);
|
||||
renderer.fillRect(x + 5, y + 5, w - 10, h - 10, false);
|
||||
renderer.drawText(UI_12_FONT_ID, x + margin, y + margin, "SLEEPING...", true, EpdFontFamily::BOLD);
|
||||
|
||||
// Make sleep screen dark unless light is selected in settings
|
||||
if (SETTINGS.sleepScreen == CrossPointSettings::SLEEP_SCREEN_MODE::DARK) {
|
||||
// Draw dark sleep image
|
||||
}
|
||||
|
||||
>>>>>>> cc60375 (Initial push)
|
||||
renderer.displayBuffer(EInkDisplay::HALF_REFRESH);
|
||||
}
|
||||
|
||||
|
||||
@ -14,8 +14,12 @@ namespace {
|
||||
constexpr int displaySettingsCount = 5;
|
||||
const SettingInfo displaySettings[displaySettingsCount] = {
|
||||
// Should match with SLEEP_SCREEN_MODE
|
||||
<<<<<<< HEAD
|
||||
SettingInfo::Enum("Sleep Screen", &CrossPointSettings::sleepScreen, {"Dark", "Light", "Custom", "Cover", "None"}),
|
||||
SettingInfo::Enum("Show Sleep Screen", &CrossPointSettings::showSleepScreen, {"Always", "Except Timeout", "Never"}),
|
||||
=======
|
||||
SettingInfo::Enum("Sleep Screen", &CrossPointSettings::sleepScreen, {"Dark", "Light", "Custom", "Cover", "Last Screen" "None"}),
|
||||
>>>>>>> cc60375 (Initial push)
|
||||
SettingInfo::Enum("Sleep Screen Cover Mode", &CrossPointSettings::sleepScreenCoverMode, {"Fit", "Crop"}),
|
||||
SettingInfo::Enum("Status Bar", &CrossPointSettings::statusBar, {"None", "No Progress", "Full"}),
|
||||
SettingInfo::Enum("Hide Battery %", &CrossPointSettings::hideBatteryPercentage, {"Never", "In Reader", "Always"}),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user