InfiniTime.git

commit 27c241c7ee51aa3b6e46c6472f7d975d9c702795

Author: Riku Isokoski <riksu9000@gmail.com>

SettingSteps: Update UI

Bigger buttons, use new color.

 src/displayapp/screens/settings/SettingSteps.cpp | 18 +++++++++++++-----


diff --git a/src/displayapp/screens/settings/SettingSteps.cpp b/src/displayapp/screens/settings/SettingSteps.cpp
index 8d756c1c224a4ea06d3ef9d33383c769c0e3314e..2e61c4d635ea0ed729cf162defd4c1d2ace05615 100644
--- a/src/displayapp/screens/settings/SettingSteps.cpp
+++ b/src/displayapp/screens/settings/SettingSteps.cpp
@@ -2,6 +2,7 @@ #include "displayapp/screens/settings/SettingSteps.h"
 #include <lvgl/lvgl.h>
 #include "displayapp/DisplayApp.h"
 #include "displayapp/screens/Symbols.h"
+#include "displayapp/InfiniTimeTheme.h"
 
 using namespace Pinetime::Applications::Screens;
 
@@ -42,22 +43,29 @@   stepValue = lv_label_create(lv_scr_act(), nullptr);
   lv_obj_set_style_local_text_font(stepValue, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_42);
   lv_label_set_text_fmt(stepValue, "%lu", settingsController.GetStepsGoal());
   lv_label_set_align(stepValue, LV_LABEL_ALIGN_CENTER);
-  lv_obj_align(stepValue, lv_scr_act(), LV_ALIGN_CENTER, 0, -10);
+  lv_obj_align(stepValue, lv_scr_act(), LV_ALIGN_CENTER, 0, -20);
+
+  static constexpr uint8_t btnWidth = 115;
+  static constexpr uint8_t btnHeight = 80;
 
   btnPlus = lv_btn_create(lv_scr_act(), nullptr);
   btnPlus->user_data = this;
-  lv_obj_set_size(btnPlus, 80, 50);
-  lv_obj_align(btnPlus, lv_scr_act(), LV_ALIGN_CENTER, 55, 80);
+  lv_obj_set_size(btnPlus, btnWidth, btnHeight);
+  lv_obj_align(btnPlus, lv_scr_act(), LV_ALIGN_IN_BOTTOM_RIGHT, 0, 0);
+  lv_obj_set_style_local_bg_color(btnPlus, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, Colors::bgAlt);
   lv_obj_t* lblPlus = lv_label_create(btnPlus, nullptr);
+  lv_obj_set_style_local_text_font(lblPlus, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_42);
   lv_label_set_text_static(lblPlus, "+");
   lv_obj_set_event_cb(btnPlus, event_handler);
 
   btnMinus = lv_btn_create(lv_scr_act(), nullptr);
   btnMinus->user_data = this;
-  lv_obj_set_size(btnMinus, 80, 50);
+  lv_obj_set_size(btnMinus, btnWidth, btnHeight);
   lv_obj_set_event_cb(btnMinus, event_handler);
-  lv_obj_align(btnMinus, lv_scr_act(), LV_ALIGN_CENTER, -55, 80);
+  lv_obj_align(btnMinus, lv_scr_act(), LV_ALIGN_IN_BOTTOM_LEFT, 0, 0);
+  lv_obj_set_style_local_bg_color(btnMinus, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, Colors::bgAlt);
   lv_obj_t* lblMinus = lv_label_create(btnMinus, nullptr);
+  lv_obj_set_style_local_text_font(lblMinus, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_42);
   lv_label_set_text_static(lblMinus, "-");
 }