Steps: Update UI
This commit is contained in:
parent
822f857d9e
commit
049fbba516
|
@ -1,7 +1,7 @@
|
|||
#include "displayapp/screens/Steps.h"
|
||||
#include <lvgl/lvgl.h>
|
||||
#include "displayapp/DisplayApp.h"
|
||||
#include "displayapp/screens/Symbols.h"
|
||||
#include "displayapp/InfiniTimeTheme.h"
|
||||
|
||||
using namespace Pinetime::Applications::Screens;
|
||||
|
||||
|
@ -18,9 +18,10 @@ Steps::Steps(Pinetime::Applications::DisplayApp* app,
|
|||
stepsArc = lv_arc_create(lv_scr_act(), nullptr);
|
||||
|
||||
lv_obj_set_style_local_bg_opa(stepsArc, LV_ARC_PART_BG, LV_STATE_DEFAULT, LV_OPA_0);
|
||||
lv_obj_set_style_local_line_color(stepsArc, LV_ARC_PART_BG, LV_STATE_DEFAULT, Colors::bgAlt);
|
||||
lv_obj_set_style_local_border_width(stepsArc, LV_ARC_PART_BG, LV_STATE_DEFAULT, 2);
|
||||
lv_obj_set_style_local_radius(stepsArc, LV_ARC_PART_BG, LV_STATE_DEFAULT, 0);
|
||||
lv_obj_set_style_local_line_color(stepsArc, LV_ARC_PART_INDIC, LV_STATE_DEFAULT, LV_COLOR_BLUE);
|
||||
lv_obj_set_style_local_line_color(stepsArc, LV_ARC_PART_INDIC, LV_STATE_DEFAULT, Colors::blue);
|
||||
lv_arc_set_end_angle(stepsArc, 200);
|
||||
lv_obj_set_size(stepsArc, 240, 240);
|
||||
lv_arc_set_range(stepsArc, 0, 500);
|
||||
|
@ -38,7 +39,7 @@ Steps::Steps(Pinetime::Applications::DisplayApp* app,
|
|||
lv_obj_align(lSteps, nullptr, LV_ALIGN_CENTER, 0, -40);
|
||||
|
||||
lv_obj_t* lstepsL = lv_label_create(lv_scr_act(), nullptr);
|
||||
lv_obj_set_style_local_text_color(lstepsL, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_GRAY);
|
||||
lv_obj_set_style_local_text_color(lstepsL, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, Colors::lightGray);
|
||||
lv_label_set_text_static(lstepsL, "Steps");
|
||||
lv_obj_align(lstepsL, lSteps, LV_ALIGN_OUT_BOTTOM_MID, 0, 5);
|
||||
|
||||
|
@ -51,8 +52,9 @@ Steps::Steps(Pinetime::Applications::DisplayApp* app,
|
|||
resetBtn = lv_btn_create(lv_scr_act(), nullptr);
|
||||
resetBtn->user_data = this;
|
||||
lv_obj_set_event_cb(resetBtn, lap_event_handler);
|
||||
lv_obj_set_height(resetBtn, 50);
|
||||
lv_obj_set_width(resetBtn, 115);
|
||||
lv_obj_set_size(resetBtn, 120, 50);
|
||||
lv_obj_set_style_local_radius(resetBtn, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, LV_RADIUS_CIRCLE);
|
||||
lv_obj_set_style_local_bg_color(resetBtn, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, Colors::bgAlt);
|
||||
lv_obj_align(resetBtn, lv_scr_act(), LV_ALIGN_IN_BOTTOM_MID, 0, 0);
|
||||
resetButtonLabel = lv_label_create(resetBtn, nullptr);
|
||||
lv_label_set_text_static(resetButtonLabel, "Reset");
|
||||
|
|
Loading…
Reference in New Issue
Block a user