Skip to content

Commit 637ed80

Browse files
Riksu9000JF002
authored andcommitted
Adjust previously missed scrollbar and firmware validation buttons
1 parent fc6458a commit 637ed80

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

src/displayapp/screens/FirmwareValidation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ FirmwareValidation::FirmwareValidation(Pinetime::Applications::DisplayApp* app,
3939

4040
buttonValidate = lv_btn_create(lv_scr_act(), nullptr);
4141
buttonValidate->user_data = this;
42-
lv_obj_set_height(buttonValidate, 50);
42+
lv_obj_set_size(buttonValidate, 115, 50);
4343
lv_obj_align(buttonValidate, NULL, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0);
4444
lv_obj_set_event_cb(buttonValidate, ButtonEventHandler);
4545
lv_obj_set_style_local_bg_color(buttonValidate, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x009900));
@@ -49,7 +49,7 @@ FirmwareValidation::FirmwareValidation(Pinetime::Applications::DisplayApp* app,
4949

5050
buttonReset = lv_btn_create(lv_scr_act(), nullptr);
5151
buttonReset->user_data = this;
52-
lv_obj_set_height(buttonReset, 50);
52+
lv_obj_set_size(buttonReset, 115, 50);
5353
lv_obj_align(buttonReset, nullptr, LV_ALIGN_IN_BOTTOM_RIGHT, 0, 0);
5454
lv_obj_set_style_local_bg_color(buttonReset, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x990000));
5555
lv_obj_set_event_cb(buttonReset, ButtonEventHandler);

src/displayapp/screens/Label.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,24 @@ Label::Label(uint8_t screenID, uint8_t numScreens, Pinetime::Applications::Displ
66
: Screen(app), labelText {labelText} {
77

88
if (numScreens > 1) {
9-
pageIndicatorBasePoints[0].x = 240 - 1;
10-
pageIndicatorBasePoints[0].y = 6;
11-
pageIndicatorBasePoints[1].x = 240 - 1;
12-
pageIndicatorBasePoints[1].y = 240 - 6;
9+
pageIndicatorBasePoints[0].x = LV_HOR_RES - 1;
10+
pageIndicatorBasePoints[0].y = 0;
11+
pageIndicatorBasePoints[1].x = LV_HOR_RES - 1;
12+
pageIndicatorBasePoints[1].y = LV_VER_RES;
1313

1414
pageIndicatorBase = lv_line_create(lv_scr_act(), NULL);
1515
lv_obj_set_style_local_line_width(pageIndicatorBase, LV_LINE_PART_MAIN, LV_STATE_DEFAULT, 3);
1616
lv_obj_set_style_local_line_color(pageIndicatorBase, LV_LINE_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x111111));
1717
lv_obj_set_style_local_line_rounded(pageIndicatorBase, LV_LINE_PART_MAIN, LV_STATE_DEFAULT, true);
1818
lv_line_set_points(pageIndicatorBase, pageIndicatorBasePoints, 2);
1919

20-
uint16_t indicatorSize = 228 / numScreens;
20+
uint16_t indicatorSize = LV_VER_RES / numScreens;
2121
uint16_t indicatorPos = indicatorSize * screenID;
2222

23-
pageIndicatorPoints[0].x = 240 - 1;
24-
pageIndicatorPoints[0].y = (6 + indicatorPos);
25-
pageIndicatorPoints[1].x = 240 - 1;
26-
pageIndicatorPoints[1].y = (6 + indicatorPos) + indicatorSize;
23+
pageIndicatorPoints[0].x = LV_HOR_RES - 1;
24+
pageIndicatorPoints[0].y = indicatorPos;
25+
pageIndicatorPoints[1].x = LV_HOR_RES - 1;
26+
pageIndicatorPoints[1].y = indicatorPos + indicatorSize;
2727

2828
pageIndicator = lv_line_create(lv_scr_act(), NULL);
2929
lv_obj_set_style_local_line_width(pageIndicator, LV_LINE_PART_MAIN, LV_STATE_DEFAULT, 3);

0 commit comments

Comments
 (0)