@@ -28,9 +28,6 @@ SettingSteps::SettingSteps(
2828 lv_obj_set_pos (container1, 30 , 60 );
2929 lv_obj_set_width (container1, LV_HOR_RES - 50 );
3030 lv_obj_set_height (container1, LV_VER_RES - 60 );
31- // lv_obj_set_auto_realign(container1, true);
32- // lv_obj_align_origo(container1, NULL, LV_ALIGN_CENTER, 0, 0);
33- // lv_cont_set_fit(container1, LV_FIT_MAX);
3431 lv_cont_set_layout (container1, LV_LAYOUT_COLUMN_LEFT);
3532
3633 lv_obj_t * title = lv_label_create (lv_scr_act (), NULL );
@@ -50,23 +47,22 @@ SettingSteps::SettingSteps(
5047 lv_obj_set_style_local_text_font (stepValue, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_42);
5148 lv_label_set_text_fmt (stepValue," %i" , settingsController.GetStepsGoal ());
5249 lv_label_set_align (stepValue, LV_LABEL_ALIGN_CENTER);
53- lv_obj_align (stepValue, lv_scr_act (), LV_ALIGN_CENTER, 0 , 0 );
50+ lv_obj_align (stepValue, lv_scr_act (), LV_ALIGN_CENTER, 0 , - 10 );
5451
5552 btnPlus = lv_btn_create (lv_scr_act (), NULL );
5653 btnPlus->user_data = this ;
57- lv_obj_set_size (btnPlus, 60 , 40 );
58- lv_obj_align (btnPlus, lv_scr_act (), LV_ALIGN_CENTER, 50 , 80 );
54+ lv_obj_set_size (btnPlus, 80 , 50 );
55+ lv_obj_align (btnPlus, lv_scr_act (), LV_ALIGN_CENTER, 55 , 80 );
5956 lv_obj_set_style_local_value_str (btnPlus, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, " +" );
6057 lv_obj_set_event_cb (btnPlus, event_handler);
6158
6259 btnMinus = lv_btn_create (lv_scr_act (), NULL );
6360 btnMinus->user_data = this ;
64- lv_obj_set_size (btnMinus, 60 , 40 );
61+ lv_obj_set_size (btnMinus, 80 , 50 );
6562 lv_obj_set_event_cb (btnMinus, event_handler);
66- lv_obj_align (btnMinus, lv_scr_act (), LV_ALIGN_CENTER, -50 , 80 );
63+ lv_obj_align (btnMinus, lv_scr_act (), LV_ALIGN_CENTER, -55 , 80 );
6764 lv_obj_set_style_local_value_str (btnMinus, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, " -" );
6865
69-
7066}
7167
7268SettingSteps::~SettingSteps () {
@@ -86,7 +82,7 @@ void SettingSteps::UpdateSelected(lv_obj_t *object, lv_event_t event) {
8682 if ( value <= 500000 ) {
8783 settingsController.SetStepsGoal (value);
8884 lv_label_set_text_fmt (stepValue," %i" , settingsController.GetStepsGoal ());
89- lv_obj_align (stepValue, lv_scr_act (), LV_ALIGN_CENTER, 0 , 0 );
85+ lv_obj_align (stepValue, lv_scr_act (), LV_ALIGN_CENTER, 0 , - 10 );
9086 }
9187 }
9288
@@ -95,7 +91,7 @@ void SettingSteps::UpdateSelected(lv_obj_t *object, lv_event_t event) {
9591 if ( value >= 1000 ) {
9692 settingsController.SetStepsGoal (value);
9793 lv_label_set_text_fmt (stepValue," %i" , settingsController.GetStepsGoal ());
98- lv_obj_align (stepValue, lv_scr_act (), LV_ALIGN_CENTER, 0 , 0 );
94+ lv_obj_align (stepValue, lv_scr_act (), LV_ALIGN_CENTER, 0 , - 10 );
9995 }
10096 }
10197
0 commit comments