diff options
| author | Jean-François Milants <jf@codingfield.com> | 2021-08-28 19:02:11 (GMT) |
|---|---|---|
| committer | Jean-François Milants <jf@codingfield.com> | 2021-08-28 19:02:11 (GMT) |
| commit | 31bc47d1cb397f5de0275d0d95aac7ca29cc7392 (patch) | |
| tree | 1fa8900ad36efc720f4c1cb741afbe545d930c94 /src/displayapp/screens/settings/SettingPineTimeStyle.h | |
| parent | ef9f809e14155ff304b8f047aa3beae3dabb78e8 (diff) | |
Settings : use enums instead of ints to store colors. Group all PTS settings into a struct.
PTS/SettingsPTS : Convert to/from LVGL color and Settings::Color, add functions to reduce code duplication.
Adapt SettingPineTimeStyle with the last Screen Interface
Diffstat (limited to 'src/displayapp/screens/settings/SettingPineTimeStyle.h')
| -rw-r--r-- | src/displayapp/screens/settings/SettingPineTimeStyle.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/displayapp/screens/settings/SettingPineTimeStyle.h b/src/displayapp/screens/settings/SettingPineTimeStyle.h index 1a01ebb..397bd86 100644 --- a/src/displayapp/screens/settings/SettingPineTimeStyle.h +++ b/src/displayapp/screens/settings/SettingPineTimeStyle.h @@ -15,12 +15,14 @@ namespace Pinetime { SettingPineTimeStyle(DisplayApp* app, Pinetime::Controllers::Settings &settingsController); ~SettingPineTimeStyle() override; - bool Refresh() override; void UpdateSelected(lv_obj_t *object, lv_event_t event); private: Controllers::Settings& settingsController; + Pinetime::Controllers::Settings::Colors GetNext(Controllers::Settings::Colors color); + Pinetime::Controllers::Settings::Colors GetPrevious(Controllers::Settings::Colors color); + lv_obj_t * btnNextTime; lv_obj_t * btnPrevTime; lv_obj_t * btnNextBar; @@ -29,9 +31,6 @@ namespace Pinetime { lv_obj_t * btnPrevBG; lv_obj_t * btnReset; lv_obj_t * btnRandom; - lv_obj_t * timeColor; - lv_obj_t * barColor; - lv_obj_t * bgColor; lv_obj_t * timebar; lv_obj_t * sidebar; lv_obj_t * timeDD1; @@ -51,11 +50,6 @@ namespace Pinetime { lv_obj_t * calendarCrossBar2; lv_obj_t * stepGauge; lv_color_t needle_colors[1]; - lv_color_t pts_colors[17] = {LV_COLOR_WHITE, LV_COLOR_SILVER, LV_COLOR_GRAY, LV_COLOR_BLACK, - LV_COLOR_RED, LV_COLOR_MAROON, LV_COLOR_YELLOW, LV_COLOR_OLIVE, - LV_COLOR_LIME, LV_COLOR_GREEN, LV_COLOR_CYAN, LV_COLOR_TEAL, - LV_COLOR_BLUE, LV_COLOR_NAVY, LV_COLOR_MAGENTA, LV_COLOR_PURPLE, - LV_COLOR_ORANGE}; }; } } |
