summaryrefslogtreecommitdiff
path: root/src/displayapp/screens
diff options
context:
space:
mode:
authorKieran Cawthray <kieranc@gmail.com>2021-10-19 00:22:45 +0200
committerKieran Cawthray <kieranc@gmail.com>2021-10-19 00:22:45 +0200
commit994f373a1428d3d82f12ada60ab5bd05dc99f708 (patch)
tree1f727a28f65dbf1736c5f6cd8be8144ab27c8d5f /src/displayapp/screens
parent1c3372b3195168897a0d563690df302848d32f86 (diff)
Change gauge needle color when background is white
Diffstat (limited to 'src/displayapp/screens')
-rw-r--r--src/displayapp/screens/PineTimeStyle.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/displayapp/screens/PineTimeStyle.cpp b/src/displayapp/screens/PineTimeStyle.cpp
index 6d4855d2..21599cc4 100644
--- a/src/displayapp/screens/PineTimeStyle.cpp
+++ b/src/displayapp/screens/PineTimeStyle.cpp
@@ -168,7 +168,11 @@ PineTimeStyle::PineTimeStyle(DisplayApp* app,
lv_obj_align(dateMonth, sidebar, LV_ALIGN_CENTER, 0, 32);
// Step count gauge
- needle_colors[0] = LV_COLOR_WHITE;
+ if (settingsController.GetPTSColorBar() == Pinetime::Controllers::Settings::Colors::White) {
+ needle_colors[0] = LV_COLOR_BLACK;
+ } else {
+ needle_colors[0] = LV_COLOR_WHITE;
+ }
stepGauge = lv_gauge_create(lv_scr_act(), nullptr);
lv_gauge_set_needle_count(stepGauge, 1, needle_colors);
lv_obj_set_size(stepGauge, 40, 40);
@@ -458,6 +462,11 @@ void PineTimeStyle::UpdateSelected(lv_obj_t* object, lv_event_t event) {
valueBar = GetNext(valueBar);
if(valueBar == Controllers::Settings::Colors::Black)
valueBar = GetNext(valueBar);
+ if(valueBar == Controllers::Settings::Colors::White) {
+ needle_colors[0] = LV_COLOR_BLACK;
+ } else {
+ needle_colors[0] = LV_COLOR_WHITE;
+ }
settingsController.SetPTSColorBar(valueBar);
lv_obj_set_style_local_bg_color(sidebar, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, Convert(valueBar));
}
@@ -465,6 +474,11 @@ void PineTimeStyle::UpdateSelected(lv_obj_t* object, lv_event_t event) {
valueBar = GetPrevious(valueBar);
if(valueBar == Controllers::Settings::Colors::Black)
valueBar = GetPrevious(valueBar);
+ if(valueBar == Controllers::Settings::Colors::White) {
+ needle_colors[0] = LV_COLOR_BLACK;
+ } else {
+ needle_colors[0] = LV_COLOR_WHITE;
+ }
settingsController.SetPTSColorBar(valueBar);
lv_obj_set_style_local_bg_color(sidebar, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, Convert(valueBar));
}