aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRiku Isokoski <riksu9000@gmail.com>2023-02-01 12:04:21 +0200
committerRiku Isokoski <riksu9000@gmail.com>2023-02-12 17:07:45 +0200
commit27c241c7ee51aa3b6e46c6472f7d975d9c702795 (patch)
treeed2353903ac382fe8025aaffa75fd7310b3d1ef2 /src
parentd4eb24b7f8d50990fcdcd4e4dcd4dbd3d1f212a2 (diff)
SettingSteps: Update UI
Bigger buttons, use new color.
Diffstat (limited to 'src')
-rw-r--r--src/displayapp/screens/settings/SettingSteps.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/displayapp/screens/settings/SettingSteps.cpp b/src/displayapp/screens/settings/SettingSteps.cpp
index 8d756c1c..2e61c4d6 100644
--- a/src/displayapp/screens/settings/SettingSteps.cpp
+++ b/src/displayapp/screens/settings/SettingSteps.cpp
@@ -2,6 +2,7 @@
#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 @@ SettingSteps::SettingSteps(Pinetime::Applications::DisplayApp* app, Pinetime::Co
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, "-");
}