Add system dark mode#1119
Conversation
|
thanks for the contribution, please, make sure to make changes following contributing guidelines (see other PRs/commits as a reference) |
jplexer
left a comment
There was a problem hiding this comment.
This is awesome, but please, as Gerard said, make the commits fit the guidelines. Thank you!
a57c3a0 to
c1f2878
Compare
|
I think I got all of the commits signed off/co-authored now. Only question I have is if I should move this preference to the "theme" section of the settings menu, or keep it in "display". UX-wise, it makes more sense in theme, but not all devices have the theme section. Any watch can support dark/light mode, but definitely not thoroughly tested on them. Otherwise, I am feeling pretty good with the state of things. Thanks all! |
|
Yes, in "Theme" would be good! I dont remember why we disabled it on some builds (maybe @gmarull can tell more?) regarding your commits, you gotta change the title as well :( the format is "area: change" |
01513f0 to
43c7475
Compare
|
Sorry about the commit message format! Hopefully it is correct this time 🤞 For the option placement: I added some conditional logic to move the option to the "Theme" menu when applicable and a fall-back to "Display", when |
b020276 to
1516500
Compare
|
Please, make sure to organize commits properly. We do not allow reverts of something added in the same PR. Just squash things, group them in logical chunks. |
|
Thanks for the commit feedback. I primarily work on repos where the entire PR gets squashed on merge - so order, reverts, etc don't matter much. I have logically split up the commits by section of the code and each should build on its own. Hopefully this matches what you are looking for. |
d603ba3 to
21d6d6b
Compare
Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Andrew McOlash <amcolash@gmail.com>
Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Andrew McOlash <amcolash@gmail.com>
Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Andrew McOlash <amcolash@gmail.com>
Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Andrew McOlash <amcolash@gmail.com>
Signed-off-by: Andrew McOlash <amcolash@gmail.com>
Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Andrew McOlash <amcolash@gmail.com>
|
Quick update on my side: I have fixed up the build + test matrix on my local fork! |
gmarull
left a comment
There was a problem hiding this comment.
we also need to think about exposing this to apps/watchfaces, so they can also support light/dark mode based on user prefs.
| #if CAPABILITY_HAS_AMBIENT_LIGHT_SENSOR | ||
| DarkModeAuto = 2, // Follows the ambient light sensor; dark mode when ambient light is low | ||
| #endif |
There was a problem hiding this comment.
I'd personally remove the auto mode tied to ambient light. I think this makes sense on *LED type displays, where black pixels do not emit or emit less light, but on e-paper, backlight has no relation with the displayed color. So IMHO, it's more an aesthetics preference on e-paper.
There was a problem hiding this comment.
I do see your point for actual light emitted. My reasoning for this was not so much about light emitted, but more about legibility. It is usually much easier to read black text, white bg in direct sunshine. At night time, white text on dark bg is easier on eyes plus easier to read for me. Although it might not be for everyone, I do think there is a valid use case here.
| } | ||
|
|
||
| bool system_theme_is_dark_mode(void) { | ||
| // Dark mode is only supported on color platforms, so treat all non-color platforms as light mode |
There was a problem hiding this comment.
dark mode could still be supported on B/W, right?
There was a problem hiding this comment.
Yes it could definitely be supported on B/W. I have not tested any of this on B/W at all, so this decision was to limit scope of the changes to color watches. We could add it for all devices, but regardless, I think this is very much in a "Beta" position right now.
| prv_legacy_app_mode_menu_push((SettingsDisplayData*)context); | ||
| break; | ||
| #endif | ||
| #if !CAPABILITY_HAS_THEMING |
There was a problem hiding this comment.
CAPABILITY_HAS_THEMING hides a primitive theming system which this PR seems to improve, can we remove flag entirely, remove dead code and just offer this feature by default?
There was a problem hiding this comment.
On all color systems, yes. However, maybe we still need the flag for B/W watches? I suppose there could always be the themes menu and optionally have the "accent color" option on color-only devices.
jplexer
left a comment
There was a problem hiding this comment.
I like this PR, but please look at the comments re: enabling has_theming again + exposing the apis publically

Hey pebble friends! I recently started using my pebble again in preparation for my new PT2 arriving soon. I noticed that using the watch at nighttime was really bright and noticed how nice the settings menu w/ black background was. Since PebbleOS is now open source, I decided to try adding in a dark mode. So far is looking really good and will hopefully be a nice feature for people.
Not sure if there are any contribution guidelines I need to keep in mind, but happy to help get this through however you all might think is best. I used claude for portions of the logic, but wrote a significant portion on my own as well. This PR does cover a lot of files, but commits should roughly line up with separate potions of code changes. Happy to split things up if it is too much in one PR though.
Technical Details:
src/fw/shell/system_theme.csystem_theme_is_dark_mode()system_theme_get_fg_color()system_theme_get_bg_color()Dark Mode: Off / On / Auto.These changes should be scoped to pebbleos with a check that I think should prevent the default values going to 3rd party apps. If it seems like there is community interest, it should be pretty simple to roll out to application developers later on.
Below are screenshots of many parts of the ui that have been touched. I did a pretty thorough check through all pages and I think it is in a pretty decent spot. The colors are washed in a few from QEMU + backlight dimming.
I still have a little bit of testing on a few more places, but pretty close to ready for merging once approved. Haven't looked too deeply at round/new/etc hardware, but I think a lot of the spots should be decent. Thanks all, love that pebble is back and so happy to be able to contribute! 😁 🪨