diff --git a/src/displayapp/screens/PineTimeStyle.cpp b/src/displayapp/screens/PineTimeStyle.cpp index a2b94b5e..fa9aec1c 100644 --- a/src/displayapp/screens/PineTimeStyle.cpp +++ b/src/displayapp/screens/PineTimeStyle.cpp @@ -561,13 +561,22 @@ void PineTimeStyle::UpdateSelected(lv_obj_t* object, lv_event_t event) { Pinetime::Controllers::Settings::Colors PineTimeStyle::GetNext(Pinetime::Controllers::Settings::Colors color) { auto colorAsInt = static_cast(color); Pinetime::Controllers::Settings::Colors nextColor; - nextColor = static_cast((colorAsInt + 1) % 17); + if (colorAsInt < 16) { + nextColor = static_cast(colorAsInt + 1); + } else { + nextColor = static_cast(0); + } return nextColor; } Pinetime::Controllers::Settings::Colors PineTimeStyle::GetPrevious(Pinetime::Controllers::Settings::Colors color) { auto colorAsInt = static_cast(color); Pinetime::Controllers::Settings::Colors prevColor; - prevColor = static_cast((colorAsInt - 1) % 17); + + if (colorAsInt > 0) { + prevColor = static_cast(colorAsInt - 1); + } else { + prevColor = static_cast(16); + } return prevColor; } \ No newline at end of file