Add a check to set default colors if all colors are white

This commit is contained in:
Kieran Cawthray 2021-06-25 21:36:55 +02:00
parent f3b40cb7a6
commit 800daecf90

View File

@ -207,6 +207,13 @@ PineTimeStyle::~PineTimeStyle() {
}
bool PineTimeStyle::Refresh() {
//Feels like a hack, but if all the colors are white, this is probably not what the user wants
if (settingsController.GetPTSColorTime() + settingsController.GetPTSColorBar() + settingsController.GetPTSColorBG() == 0) {
settingsController.SetPTSColorTime(11);
settingsController.SetPTSColorBar(11);
settingsController.SetPTSColorBG(3);
}
batteryPercentRemaining = batteryController.PercentRemaining();
if (batteryPercentRemaining.IsUpdated()) {
auto batteryPercent = batteryPercentRemaining.Get();