Skip to content

Commit 3cef05b

Browse files
committed
Merge branch 'develop' into refresh_rework
2 parents c3d8ee1 + ee44b6f commit 3cef05b

19 files changed

Lines changed: 218 additions & 182 deletions

doc/ui/example.png

10.4 KB
Loading

doc/ui_guidelines.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# UI design guidelines
2+
3+
- Align objects all the way to the edge or corner
4+
- Buttons should generally be at least 50px high
5+
- Buttons should generally be on the bottom edge
6+
- Make interactable objects **big**
7+
- Recommendations for inner padding, aka distance between buttons:
8+
- When aligning 4 objects: 4px, e.g. Settings
9+
- When aligning 3 objects: 6px, e.g. App list
10+
- When aligning 2 objects: 10px, e.g. Quick settings
11+
- When using a page indicator, leave 8px for it on the right side
12+
- It is acceptable to leave 8px on the left side as well to center the content
13+
- Top bar takes at least 20px + padding
14+
- Top bar right icons move 8px to the left when using a page indicator
15+
16+
![example layouts](./ui/example.png)

src/components/motor/MotorController.cpp

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
#include "systemtask/SystemTask.h"
44
#include "app_timer.h"
55

6-
APP_TIMER_DEF(vibTimer);
6+
APP_TIMER_DEF(shortVibTimer);
7+
APP_TIMER_DEF(longVibTimer);
78

89
using namespace Pinetime::Controllers;
910

@@ -13,19 +14,39 @@ MotorController::MotorController(Controllers::Settings& settingsController) : se
1314
void MotorController::Init() {
1415
nrf_gpio_cfg_output(pinMotor);
1516
nrf_gpio_pin_set(pinMotor);
16-
app_timer_create(&vibTimer, APP_TIMER_MODE_SINGLE_SHOT, vibrate);
17+
app_timer_init();
18+
19+
app_timer_create(&shortVibTimer, APP_TIMER_MODE_SINGLE_SHOT, StopMotor);
20+
app_timer_create(&longVibTimer, APP_TIMER_MODE_REPEATED, Ring);
1721
}
1822

19-
void MotorController::SetDuration(uint8_t motorDuration) {
23+
void MotorController::Ring(void* p_context) {
24+
auto* motorController = static_cast<MotorController*>(p_context);
25+
motorController->RunForDuration(50);
26+
}
2027

21-
if (settingsController.GetVibrationStatus() == Controllers::Settings::Vibration::OFF)
28+
void MotorController::RunForDuration(uint8_t motorDuration) {
29+
if (settingsController.GetVibrationStatus() == Controllers::Settings::Vibration::OFF) {
2230
return;
31+
}
2332

2433
nrf_gpio_pin_clear(pinMotor);
25-
/* Start timer for motorDuration miliseconds and timer triggers vibrate() when it finishes*/
26-
app_timer_start(vibTimer, APP_TIMER_TICKS(motorDuration), NULL);
34+
app_timer_start(shortVibTimer, APP_TIMER_TICKS(motorDuration), nullptr);
35+
}
36+
37+
void MotorController::StartRinging() {
38+
if (settingsController.GetVibrationStatus() == Controllers::Settings::Vibration::OFF) {
39+
return;
40+
}
41+
Ring(this);
42+
app_timer_start(longVibTimer, APP_TIMER_TICKS(1000), this);
2743
}
2844

29-
void MotorController::vibrate(void* p_context) {
45+
void MotorController::StopRinging() {
46+
app_timer_stop(longVibTimer);
3047
nrf_gpio_pin_set(pinMotor);
31-
}
48+
}
49+
50+
void MotorController::StopMotor(void* p_context) {
51+
nrf_gpio_pin_set(pinMotor);
52+
}

src/components/motor/MotorController.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,14 @@ namespace Pinetime {
1212
public:
1313
MotorController(Controllers::Settings& settingsController);
1414
void Init();
15-
void SetDuration(uint8_t motorDuration);
15+
void RunForDuration(uint8_t motorDuration);
16+
void StartRinging();
17+
static void StopRinging();
1618

1719
private:
20+
static void Ring(void* p_context);
1821
Controllers::Settings& settingsController;
19-
static void vibrate(void* p_context);
22+
static void StopMotor(void* p_context);
2023
};
2124
}
2225
}

src/displayapp/DisplayApp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,12 +336,12 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction)
336336

337337
case Apps::Notifications:
338338
currentScreen = std::make_unique<Screens::Notifications>(
339-
this, notificationManager, systemTask->nimble().alertService(), Screens::Notifications::Modes::Normal);
339+
this, notificationManager, systemTask->nimble().alertService(), motorController, Screens::Notifications::Modes::Normal);
340340
ReturnApp(Apps::Clock, FullRefreshDirections::Up, TouchEvents::SwipeUp);
341341
break;
342342
case Apps::NotificationsPreview:
343343
currentScreen = std::make_unique<Screens::Notifications>(
344-
this, notificationManager, systemTask->nimble().alertService(), Screens::Notifications::Modes::Preview);
344+
this, notificationManager, systemTask->nimble().alertService(), motorController, Screens::Notifications::Modes::Preview);
345345
ReturnApp(Apps::Clock, FullRefreshDirections::Up, TouchEvents::SwipeUp);
346346
break;
347347
case Apps::Timer:

src/displayapp/screens/FirmwareValidation.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ FirmwareValidation::FirmwareValidation(Pinetime::Applications::DisplayApp* app,
3838
lv_label_set_text(labelIsValidated, "Please #00ff00 Validate# this version or\n#ff0000 Reset# to rollback to the previous version.");
3939

4040
buttonValidate = lv_btn_create(lv_scr_act(), nullptr);
41-
lv_obj_align(buttonValidate, NULL, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0);
4241
buttonValidate->user_data = this;
42+
lv_obj_set_size(buttonValidate, 115, 50);
43+
lv_obj_align(buttonValidate, NULL, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0);
4344
lv_obj_set_event_cb(buttonValidate, ButtonEventHandler);
4445
lv_obj_set_style_local_bg_color(buttonValidate, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x009900));
4546

@@ -48,6 +49,7 @@ FirmwareValidation::FirmwareValidation(Pinetime::Applications::DisplayApp* app,
4849

4950
buttonReset = lv_btn_create(lv_scr_act(), nullptr);
5051
buttonReset->user_data = this;
52+
lv_obj_set_size(buttonReset, 115, 50);
5153
lv_obj_align(buttonReset, nullptr, LV_ALIGN_IN_BOTTOM_RIGHT, 0, 0);
5254
lv_obj_set_style_local_bg_color(buttonReset, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x990000));
5355
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);

src/displayapp/screens/List.cpp

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,42 +25,38 @@ List::List(uint8_t screenID,
2525
settingsController.SetSettingsMenu(screenID);
2626

2727
if (numScreens > 1) {
28-
pageIndicatorBasePoints[0].x = 240 - 1;
29-
pageIndicatorBasePoints[0].y = 6;
30-
pageIndicatorBasePoints[1].x = 240 - 1;
31-
pageIndicatorBasePoints[1].y = 240 - 6;
28+
pageIndicatorBasePoints[0].x = LV_HOR_RES - 1;
29+
pageIndicatorBasePoints[0].y = 0;
30+
pageIndicatorBasePoints[1].x = LV_HOR_RES - 1;
31+
pageIndicatorBasePoints[1].y = LV_VER_RES;
3232

3333
pageIndicatorBase = lv_line_create(lv_scr_act(), NULL);
3434
lv_obj_set_style_local_line_width(pageIndicatorBase, LV_LINE_PART_MAIN, LV_STATE_DEFAULT, 3);
3535
lv_obj_set_style_local_line_color(pageIndicatorBase, LV_LINE_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x111111));
36-
lv_obj_set_style_local_line_rounded(pageIndicatorBase, LV_LINE_PART_MAIN, LV_STATE_DEFAULT, true);
3736
lv_line_set_points(pageIndicatorBase, pageIndicatorBasePoints, 2);
3837

39-
uint16_t indicatorSize = 228 / numScreens;
40-
uint16_t indicatorPos = indicatorSize * screenID;
38+
const uint16_t indicatorSize = LV_VER_RES / numScreens;
39+
const uint16_t indicatorPos = indicatorSize * screenID;
4140

42-
pageIndicatorPoints[0].x = 240 - 1;
43-
pageIndicatorPoints[0].y = 6 + indicatorPos;
44-
pageIndicatorPoints[1].x = 240 - 1;
45-
pageIndicatorPoints[1].y = 6 + indicatorPos + indicatorSize;
41+
pageIndicatorPoints[0].x = LV_HOR_RES - 1;
42+
pageIndicatorPoints[0].y = indicatorPos;
43+
pageIndicatorPoints[1].x = LV_HOR_RES - 1;
44+
pageIndicatorPoints[1].y = indicatorPos + indicatorSize;
4645

4746
pageIndicator = lv_line_create(lv_scr_act(), NULL);
4847
lv_obj_set_style_local_line_width(pageIndicator, LV_LINE_PART_MAIN, LV_STATE_DEFAULT, 3);
4948
lv_obj_set_style_local_line_color(pageIndicator, LV_LINE_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_GRAY);
50-
lv_obj_set_style_local_line_rounded(pageIndicator, LV_LINE_PART_MAIN, LV_STATE_DEFAULT, true);
5149
lv_line_set_points(pageIndicator, pageIndicatorPoints, 2);
5250
}
5351

5452
lv_obj_t* container1 = lv_cont_create(lv_scr_act(), nullptr);
5553

56-
// lv_obj_set_style_local_bg_color(container1, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x111111));
5754
lv_obj_set_style_local_bg_opa(container1, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_TRANSP);
58-
lv_obj_set_style_local_pad_all(container1, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, 10);
59-
lv_obj_set_style_local_pad_inner(container1, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, 5);
55+
lv_obj_set_style_local_pad_inner(container1, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, 4);
6056
lv_obj_set_style_local_border_width(container1, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, 0);
6157

6258
lv_obj_set_pos(container1, 0, 0);
63-
lv_obj_set_width(container1, LV_HOR_RES - 15);
59+
lv_obj_set_width(container1, LV_HOR_RES - 8);
6460
lv_obj_set_height(container1, LV_VER_RES);
6561
lv_cont_set_layout(container1, LV_LAYOUT_COLUMN_LEFT);
6662

@@ -73,11 +69,11 @@ List::List(uint8_t screenID,
7369

7470
itemApps[i] = lv_btn_create(container1, nullptr);
7571
lv_obj_set_style_local_bg_opa(itemApps[i], LV_BTN_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_20);
76-
lv_obj_set_style_local_radius(itemApps[i], LV_BTN_PART_MAIN, LV_STATE_DEFAULT, 20);
72+
lv_obj_set_style_local_radius(itemApps[i], LV_BTN_PART_MAIN, LV_STATE_DEFAULT, 57);
7773
lv_obj_set_style_local_bg_color(itemApps[i], LV_BTN_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_AQUA);
7874

79-
lv_obj_set_width(itemApps[i], LV_HOR_RES - 25);
80-
lv_obj_set_height(itemApps[i], 52);
75+
lv_obj_set_width(itemApps[i], LV_HOR_RES - 8);
76+
lv_obj_set_height(itemApps[i], 57);
8177
lv_obj_set_event_cb(itemApps[i], ButtonEventHandler);
8278
lv_btn_set_layout(itemApps[i], LV_LAYOUT_ROW_MID);
8379
itemApps[i]->user_data = this;

src/displayapp/screens/Metronome.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ void Metronome::Refresh() {
8686
counter--;
8787
if (counter == 0) {
8888
counter = bpb;
89-
motorController.SetDuration(90);
89+
motorController.RunForDuration(90);
9090
} else {
91-
motorController.SetDuration(30);
91+
motorController.RunForDuration(30);
9292
}
9393
}
9494
}

src/displayapp/screens/Music.cpp

Lines changed: 31 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -50,60 +50,55 @@ inline void lv_img_set_src_arr(lv_obj_t* img, const lv_img_dsc_t* src_img) {
5050
Music::Music(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::MusicService& music) : Screen(app), musicService(music) {
5151
lv_obj_t* label;
5252

53+
lv_style_init(&btn_style);
54+
lv_style_set_radius(&btn_style, LV_STATE_DEFAULT, 20);
55+
lv_style_set_bg_color(&btn_style, LV_STATE_DEFAULT, LV_COLOR_AQUA);
56+
lv_style_set_bg_opa(&btn_style, LV_STATE_DEFAULT, LV_OPA_20);
57+
5358
btnVolDown = lv_btn_create(lv_scr_act(), nullptr);
5459
btnVolDown->user_data = this;
5560
lv_obj_set_event_cb(btnVolDown, event_handler);
56-
lv_obj_set_size(btnVolDown, 65, 75);
57-
lv_obj_align(btnVolDown, nullptr, LV_ALIGN_IN_BOTTOM_LEFT, 15, -10);
58-
lv_obj_set_style_local_radius(btnVolDown, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, 20);
59-
lv_obj_set_style_local_bg_color(btnVolDown, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_AQUA);
60-
lv_obj_set_style_local_bg_opa(btnVolDown, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_20);
61+
lv_obj_set_size(btnVolDown, 76, 76);
62+
lv_obj_align(btnVolDown, nullptr, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0);
63+
lv_obj_add_style(btnVolDown, LV_STATE_DEFAULT, &btn_style);
6164
label = lv_label_create(btnVolDown, nullptr);
6265
lv_label_set_text(label, Symbols::volumDown);
63-
lv_obj_set_hidden(btnVolDown, !displayVolumeButtons);
66+
lv_obj_set_hidden(btnVolDown, true);
6467

6568
btnVolUp = lv_btn_create(lv_scr_act(), nullptr);
6669
btnVolUp->user_data = this;
6770
lv_obj_set_event_cb(btnVolUp, event_handler);
68-
lv_obj_set_size(btnVolUp, 65, 75);
69-
lv_obj_align(btnVolUp, nullptr, LV_ALIGN_IN_BOTTOM_RIGHT, -15, -10);
70-
lv_obj_set_style_local_radius(btnVolUp, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, 20);
71-
lv_obj_set_style_local_bg_color(btnVolUp, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_AQUA);
72-
lv_obj_set_style_local_bg_opa(btnVolUp, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_20);
71+
lv_obj_set_size(btnVolUp, 76, 76);
72+
lv_obj_align(btnVolUp, nullptr, LV_ALIGN_IN_BOTTOM_RIGHT, 0, 0);
73+
lv_obj_add_style(btnVolUp, LV_STATE_DEFAULT, &btn_style);
7374
label = lv_label_create(btnVolUp, nullptr);
7475
lv_label_set_text(label, Symbols::volumUp);
75-
lv_obj_set_hidden(btnVolUp, !displayVolumeButtons);
76+
lv_obj_set_hidden(btnVolUp, true);
7677

7778
btnPrev = lv_btn_create(lv_scr_act(), nullptr);
7879
btnPrev->user_data = this;
7980
lv_obj_set_event_cb(btnPrev, event_handler);
80-
lv_obj_set_size(btnPrev, 65, 75);
81-
lv_obj_align(btnPrev, nullptr, LV_ALIGN_IN_BOTTOM_LEFT, 15, -10);
82-
lv_obj_set_style_local_radius(btnPrev, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, 20);
83-
lv_obj_set_style_local_bg_color(btnPrev, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_AQUA);
84-
lv_obj_set_style_local_bg_opa(btnPrev, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_20);
81+
lv_obj_set_size(btnPrev, 76, 76);
82+
lv_obj_align(btnPrev, nullptr, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0);
83+
lv_obj_add_style(btnPrev, LV_STATE_DEFAULT, &btn_style);
8584
label = lv_label_create(btnPrev, nullptr);
8685
lv_label_set_text(label, Symbols::stepBackward);
8786

8887
btnNext = lv_btn_create(lv_scr_act(), nullptr);
8988
btnNext->user_data = this;
9089
lv_obj_set_event_cb(btnNext, event_handler);
91-
lv_obj_set_size(btnNext, 65, 75);
92-
lv_obj_align(btnNext, nullptr, LV_ALIGN_IN_BOTTOM_RIGHT, -15, -10);
93-
lv_obj_set_style_local_radius(btnNext, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, 20);
94-
lv_obj_set_style_local_bg_color(btnNext, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_AQUA);
95-
lv_obj_set_style_local_bg_opa(btnNext, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_20);
90+
lv_obj_set_size(btnNext, 76, 76);
91+
lv_obj_align(btnNext, nullptr, LV_ALIGN_IN_BOTTOM_RIGHT, 0, 0);
92+
lv_obj_add_style(btnNext, LV_STATE_DEFAULT, &btn_style);
9693
label = lv_label_create(btnNext, nullptr);
9794
lv_label_set_text(label, Symbols::stepForward);
9895

9996
btnPlayPause = lv_btn_create(lv_scr_act(), nullptr);
10097
btnPlayPause->user_data = this;
10198
lv_obj_set_event_cb(btnPlayPause, event_handler);
102-
lv_obj_set_size(btnPlayPause, 65, 75);
103-
lv_obj_align(btnPlayPause, nullptr, LV_ALIGN_IN_BOTTOM_MID, 0, -10);
104-
lv_obj_set_style_local_radius(btnPlayPause, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, 20);
105-
lv_obj_set_style_local_bg_color(btnPlayPause, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_AQUA);
106-
lv_obj_set_style_local_bg_opa(btnPlayPause, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_20);
99+
lv_obj_set_size(btnPlayPause, 76, 76);
100+
lv_obj_align(btnPlayPause, nullptr, LV_ALIGN_IN_BOTTOM_MID, 0, 0);
101+
lv_obj_add_style(btnPlayPause, LV_STATE_DEFAULT, &btn_style);
107102
txtPlayPause = lv_label_create(btnPlayPause, nullptr);
108103
lv_label_set_text(txtPlayPause, Symbols::play);
109104

@@ -150,6 +145,7 @@ Music::Music(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::Mus
150145

151146
Music::~Music() {
152147
lv_task_del(taskRefresh);
148+
lv_style_reset(&btn_style);
153149
lv_obj_clean(lv_scr_act());
154150
}
155151

@@ -273,21 +269,19 @@ void Music::OnObjectEvent(lv_obj_t* obj, lv_event_t event) {
273269
bool Music::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
274270
switch (event) {
275271
case TouchEvents::SwipeUp: {
276-
displayVolumeButtons = true;
277-
lv_obj_set_hidden(btnVolDown, !displayVolumeButtons);
278-
lv_obj_set_hidden(btnVolUp, !displayVolumeButtons);
272+
lv_obj_set_hidden(btnVolDown, false);
273+
lv_obj_set_hidden(btnVolUp, false);
279274

280-
lv_obj_set_hidden(btnNext, displayVolumeButtons);
281-
lv_obj_set_hidden(btnPrev, displayVolumeButtons);
275+
lv_obj_set_hidden(btnNext, true);
276+
lv_obj_set_hidden(btnPrev, true);
282277
return true;
283278
}
284279
case TouchEvents::SwipeDown: {
285-
displayVolumeButtons = false;
286-
lv_obj_set_hidden(btnNext, displayVolumeButtons);
287-
lv_obj_set_hidden(btnPrev, displayVolumeButtons);
280+
lv_obj_set_hidden(btnNext, false);
281+
lv_obj_set_hidden(btnPrev, false);
288282

289-
lv_obj_set_hidden(btnVolDown, !displayVolumeButtons);
290-
lv_obj_set_hidden(btnVolUp, !displayVolumeButtons);
283+
lv_obj_set_hidden(btnVolDown, true);
284+
lv_obj_set_hidden(btnVolUp, true);
291285
return true;
292286
}
293287
case TouchEvents::SwipeLeft: {

0 commit comments

Comments
 (0)