aboutsummaryrefslogtreecommitdiffstats
path: root/src/displayapp/screens
diff options
context:
space:
mode:
authorRiku Isokoski <riksu9000@gmail.com>2022-04-20 12:21:35 +0300
committerJF <JF002@users.noreply.github.com>2022-05-08 13:21:27 +0200
commit81607487335c8e90197f64af119d6d4ed50af6b6 (patch)
treea2931875e8eeb830ceef584f4d6af992dfcc384f /src/displayapp/screens
parent6dac0a62f4dfdb4b8b480aa03a3eb4ac08feebaa (diff)
Force full screen refresh with a rounder function
When the screen switches, the full screen needs to be refreshed for the hardware scrolling to work. This was enforced with backgroundLabels, but is simpler to do with a rounder function.
Diffstat (limited to 'src/displayapp/screens')
-rw-r--r--src/displayapp/screens/BatteryInfo.cpp6
-rw-r--r--src/displayapp/screens/FirmwareUpdate.cpp6
-rw-r--r--src/displayapp/screens/List.cpp6
-rw-r--r--src/displayapp/screens/Notifications.cpp6
-rw-r--r--src/displayapp/screens/PassKey.cpp7
-rw-r--r--src/displayapp/screens/PassKey.h1
-rw-r--r--src/displayapp/screens/Steps.cpp6
-rw-r--r--src/displayapp/screens/Tile.cpp6
-rw-r--r--src/displayapp/screens/Timer.cpp6
-rw-r--r--src/displayapp/screens/Timer.h1
-rw-r--r--src/displayapp/screens/Twos.cpp6
-rw-r--r--src/displayapp/screens/WatchFaceDigital.cpp7
-rw-r--r--src/displayapp/screens/WatchFaceDigital.h1
-rw-r--r--src/displayapp/screens/WatchFacePineTimeStyle.cpp7
-rw-r--r--src/displayapp/screens/WatchFacePineTimeStyle.h1
-rw-r--r--src/displayapp/screens/WatchFaceTerminal.cpp7
-rw-r--r--src/displayapp/screens/WatchFaceTerminal.h1
-rw-r--r--src/displayapp/screens/settings/QuickSettings.cpp6
18 files changed, 0 insertions, 87 deletions
diff --git a/src/displayapp/screens/BatteryInfo.cpp b/src/displayapp/screens/BatteryInfo.cpp
index 2d9154fc..d9d479f8 100644
--- a/src/displayapp/screens/BatteryInfo.cpp
+++ b/src/displayapp/screens/BatteryInfo.cpp
@@ -38,12 +38,6 @@ BatteryInfo::BatteryInfo(Pinetime::Applications::DisplayApp* app, Pinetime::Cont
lv_label_set_align(voltage, LV_LABEL_ALIGN_CENTER);
lv_obj_align(voltage, nullptr, LV_ALIGN_CENTER, 0, 95);
- lv_obj_t* backgroundLabel = lv_label_create(lv_scr_act(), nullptr);
- lv_label_set_long_mode(backgroundLabel, LV_LABEL_LONG_CROP);
- lv_obj_set_size(backgroundLabel, 240, 240);
- lv_obj_set_pos(backgroundLabel, 0, 0);
- lv_label_set_text_static(backgroundLabel, "");
-
taskRefresh = lv_task_create(RefreshTaskCallback, 5000, LV_TASK_PRIO_MID, this);
Refresh();
}
diff --git a/src/displayapp/screens/FirmwareUpdate.cpp b/src/displayapp/screens/FirmwareUpdate.cpp
index 0e043097..01530e1c 100644
--- a/src/displayapp/screens/FirmwareUpdate.cpp
+++ b/src/displayapp/screens/FirmwareUpdate.cpp
@@ -8,12 +8,6 @@ using namespace Pinetime::Applications::Screens;
FirmwareUpdate::FirmwareUpdate(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::Ble& bleController)
: Screen(app), bleController {bleController} {
- lv_obj_t* backgroundLabel = lv_label_create(lv_scr_act(), nullptr);
- lv_label_set_long_mode(backgroundLabel, LV_LABEL_LONG_CROP);
- lv_obj_set_size(backgroundLabel, 240, 240);
- lv_obj_set_pos(backgroundLabel, 0, 0);
- lv_label_set_text_static(backgroundLabel, "");
-
titleLabel = lv_label_create(lv_scr_act(), nullptr);
lv_label_set_text_static(titleLabel, "Firmware update");
lv_obj_align(titleLabel, nullptr, LV_ALIGN_IN_TOP_MID, 0, 50);
diff --git a/src/displayapp/screens/List.cpp b/src/displayapp/screens/List.cpp
index 9e21a8b9..0bc7da80 100644
--- a/src/displayapp/screens/List.cpp
+++ b/src/displayapp/screens/List.cpp
@@ -85,12 +85,6 @@ List::List(uint8_t screenID,
lv_label_set_text_fmt(labelBt, " %s", applications[i].name);
}
}
-
- lv_obj_t* backgroundLabel = lv_label_create(lv_scr_act(), nullptr);
- lv_label_set_long_mode(backgroundLabel, LV_LABEL_LONG_CROP);
- lv_obj_set_size(backgroundLabel, LV_HOR_RES, LV_VER_RES);
- lv_obj_set_pos(backgroundLabel, 0, 0);
- lv_label_set_text_static(backgroundLabel, "");
}
List::~List() {
diff --git a/src/displayapp/screens/Notifications.cpp b/src/displayapp/screens/Notifications.cpp
index 21843083..8bba8ce6 100644
--- a/src/displayapp/screens/Notifications.cpp
+++ b/src/displayapp/screens/Notifications.cpp
@@ -265,12 +265,6 @@ Notifications::NotificationItem::NotificationItem(const char* title,
lv_obj_set_style_local_bg_color(bt_mute, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_MAKE(0xb0, 0xb0, 0xb0));
} break;
}
-
- lv_obj_t* backgroundLabel = lv_label_create(lv_scr_act(), nullptr);
- lv_label_set_long_mode(backgroundLabel, LV_LABEL_LONG_CROP);
- lv_obj_set_size(backgroundLabel, 240, 240);
- lv_obj_set_pos(backgroundLabel, 0, 0);
- lv_label_set_text_static(backgroundLabel, "");
}
void Notifications::NotificationItem::OnCallButtonEvent(lv_obj_t* obj, lv_event_t event) {
diff --git a/src/displayapp/screens/PassKey.cpp b/src/displayapp/screens/PassKey.cpp
index e9715cd6..13cdcc25 100644
--- a/src/displayapp/screens/PassKey.cpp
+++ b/src/displayapp/screens/PassKey.cpp
@@ -9,13 +9,6 @@ PassKey::PassKey(Pinetime::Applications::DisplayApp* app, uint32_t key) : Screen
lv_obj_set_style_local_text_font(passkeyLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_42);
lv_label_set_text_fmt(passkeyLabel, "%06u", key);
lv_obj_align(passkeyLabel, nullptr, LV_ALIGN_CENTER, 0, -20);
-
- backgroundLabel = lv_label_create(lv_scr_act(), nullptr);
- lv_obj_set_click(backgroundLabel, true);
- lv_label_set_long_mode(backgroundLabel, LV_LABEL_LONG_CROP);
- lv_obj_set_size(backgroundLabel, 240, 240);
- lv_obj_set_pos(backgroundLabel, 0, 0);
- lv_label_set_text_static(backgroundLabel, "");
}
PassKey::~PassKey() {
diff --git a/src/displayapp/screens/PassKey.h b/src/displayapp/screens/PassKey.h
index 16e72a3c..82735b56 100644
--- a/src/displayapp/screens/PassKey.h
+++ b/src/displayapp/screens/PassKey.h
@@ -14,7 +14,6 @@ namespace Pinetime {
private:
lv_obj_t* passkeyLabel;
- lv_obj_t* backgroundLabel;
};
}
}
diff --git a/src/displayapp/screens/Steps.cpp b/src/displayapp/screens/Steps.cpp
index 8b5d3e48..0dcdcf59 100644
--- a/src/displayapp/screens/Steps.cpp
+++ b/src/displayapp/screens/Steps.cpp
@@ -48,12 +48,6 @@ Steps::Steps(Pinetime::Applications::DisplayApp* app,
lv_label_set_align(lstepsGoal, LV_LABEL_ALIGN_CENTER);
lv_obj_align(lstepsGoal, lSteps, LV_ALIGN_OUT_BOTTOM_MID, 0, 40);
- lv_obj_t* backgroundLabel = lv_label_create(lv_scr_act(), nullptr);
- lv_label_set_long_mode(backgroundLabel, LV_LABEL_LONG_CROP);
- lv_obj_set_size(backgroundLabel, 240, 240);
- lv_obj_set_pos(backgroundLabel, 0, 0);
- lv_label_set_text_static(backgroundLabel, "");
-
resetBtn = lv_btn_create(lv_scr_act(), nullptr);
resetBtn->user_data = this;
lv_obj_set_event_cb(resetBtn, lap_event_handler);
diff --git a/src/displayapp/screens/Tile.cpp b/src/displayapp/screens/Tile.cpp
index 2d61b1dc..e90c7535 100644
--- a/src/displayapp/screens/Tile.cpp
+++ b/src/displayapp/screens/Tile.cpp
@@ -104,12 +104,6 @@ Tile::Tile(uint8_t screenID,
btnm1->user_data = this;
lv_obj_set_event_cb(btnm1, event_handler);
- lv_obj_t* backgroundLabel = lv_label_create(lv_scr_act(), nullptr);
- lv_label_set_long_mode(backgroundLabel, LV_LABEL_LONG_CROP);
- lv_obj_set_size(backgroundLabel, 240, 240);
- lv_obj_set_pos(backgroundLabel, 0, 0);
- lv_label_set_text_static(backgroundLabel, "");
-
taskUpdate = lv_task_create(lv_update_task, 5000, LV_TASK_PRIO_MID, this);
UpdateScreen();
diff --git a/src/displayapp/screens/Timer.cpp b/src/displayapp/screens/Timer.cpp
index bf630b67..285502c6 100644
--- a/src/displayapp/screens/Timer.cpp
+++ b/src/displayapp/screens/Timer.cpp
@@ -46,12 +46,6 @@ void Timer::CreateButtons() {
Timer::Timer(DisplayApp* app, Controllers::TimerController& timerController)
: Screen(app), running {true}, timerController {timerController} {
- backgroundLabel = lv_label_create(lv_scr_act(), nullptr);
- lv_obj_set_click(backgroundLabel, true);
- lv_label_set_long_mode(backgroundLabel, LV_LABEL_LONG_CROP);
- lv_obj_set_size(backgroundLabel, 240, 240);
- lv_obj_set_pos(backgroundLabel, 0, 0);
- lv_label_set_text_static(backgroundLabel, "");
time = lv_label_create(lv_scr_act(), nullptr);
lv_obj_set_style_local_text_font(time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_76);
diff --git a/src/displayapp/screens/Timer.h b/src/displayapp/screens/Timer.h
index 93e84c82..c1f7f9e2 100644
--- a/src/displayapp/screens/Timer.h
+++ b/src/displayapp/screens/Timer.h
@@ -24,7 +24,6 @@ namespace Pinetime::Applications::Screens {
uint8_t secondsToSet = 0;
uint8_t minutesToSet = 0;
Controllers::TimerController& timerController;
- lv_obj_t* backgroundLabel;
lv_obj_t* time;
lv_obj_t* msecTime;
lv_obj_t* btnPlayPause;
diff --git a/src/displayapp/screens/Twos.cpp b/src/displayapp/screens/Twos.cpp
index ca9295d5..7e465fcd 100644
--- a/src/displayapp/screens/Twos.cpp
+++ b/src/displayapp/screens/Twos.cpp
@@ -85,12 +85,6 @@ Twos::Twos(Pinetime::Applications::DisplayApp* app) : Screen(app) {
lv_obj_align(scoreText, nullptr, LV_ALIGN_IN_TOP_LEFT, 0, 10);
lv_label_set_recolor(scoreText, true);
lv_label_set_text_fmt(scoreText, "Score #FFFF00 %i#", score);
-
- lv_obj_t* backgroundLabel = lv_label_create(lv_scr_act(), nullptr);
- lv_label_set_long_mode(backgroundLabel, LV_LABEL_LONG_CROP);
- lv_obj_set_size(backgroundLabel, 240, 240);
- lv_obj_set_pos(backgroundLabel, 0, 0);
- lv_label_set_text_static(backgroundLabel, "");
}
Twos::~Twos() {
diff --git a/src/displayapp/screens/WatchFaceDigital.cpp b/src/displayapp/screens/WatchFaceDigital.cpp
index 8a620bd0..1df38255 100644
--- a/src/displayapp/screens/WatchFaceDigital.cpp
+++ b/src/displayapp/screens/WatchFaceDigital.cpp
@@ -64,13 +64,6 @@ WatchFaceDigital::WatchFaceDigital(DisplayApp* app,
lv_label_set_text_static(label_time_ampm, "");
lv_obj_align(label_time_ampm, lv_scr_act(), LV_ALIGN_IN_RIGHT_MID, -30, -55);
- backgroundLabel = lv_label_create(lv_scr_act(), nullptr);
- lv_obj_set_click(backgroundLabel, true);
- lv_label_set_long_mode(backgroundLabel, LV_LABEL_LONG_CROP);
- lv_obj_set_size(backgroundLabel, 240, 240);
- lv_obj_set_pos(backgroundLabel, 0, 0);
- lv_label_set_text_static(backgroundLabel, "");
-
heartbeatIcon = lv_label_create(lv_scr_act(), nullptr);
lv_label_set_text_static(heartbeatIcon, Symbols::heartBeat);
lv_obj_set_style_local_text_color(heartbeatIcon, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0xCE1B1B));
diff --git a/src/displayapp/screens/WatchFaceDigital.h b/src/displayapp/screens/WatchFaceDigital.h
index cd83689a..bd27806f 100644
--- a/src/displayapp/screens/WatchFaceDigital.h
+++ b/src/displayapp/screens/WatchFaceDigital.h
@@ -59,7 +59,6 @@ namespace Pinetime {
lv_obj_t* label_time;
lv_obj_t* label_time_ampm;
lv_obj_t* label_date;
- lv_obj_t* backgroundLabel;
lv_obj_t* bleIcon;
lv_obj_t* batteryPlug;
lv_obj_t* heartbeatIcon;
diff --git a/src/displayapp/screens/WatchFacePineTimeStyle.cpp b/src/displayapp/screens/WatchFacePineTimeStyle.cpp
index ae9f5815..a7772417 100644
--- a/src/displayapp/screens/WatchFacePineTimeStyle.cpp
+++ b/src/displayapp/screens/WatchFacePineTimeStyle.cpp
@@ -198,13 +198,6 @@ WatchFacePineTimeStyle::WatchFacePineTimeStyle(DisplayApp* app,
lv_obj_set_style_local_line_width(stepGauge, LV_GAUGE_PART_NEEDLE, LV_STATE_DEFAULT, 3);
lv_obj_set_style_local_pad_inner(stepGauge, LV_GAUGE_PART_NEEDLE, LV_STATE_DEFAULT, 4);
- backgroundLabel = lv_label_create(lv_scr_act(), nullptr);
- lv_obj_set_click(backgroundLabel, true);
- lv_label_set_long_mode(backgroundLabel, LV_LABEL_LONG_CROP);
- lv_obj_set_size(backgroundLabel, 240, 240);
- lv_obj_set_pos(backgroundLabel, 0, 0);
- lv_label_set_text_static(backgroundLabel, "");
-
btnNextTime = lv_btn_create(lv_scr_act(), nullptr);
btnNextTime->user_data = this;
lv_obj_set_size(btnNextTime, 60, 60);
diff --git a/src/displayapp/screens/WatchFacePineTimeStyle.h b/src/displayapp/screens/WatchFacePineTimeStyle.h
index e703d89c..cfabc2c7 100644
--- a/src/displayapp/screens/WatchFacePineTimeStyle.h
+++ b/src/displayapp/screens/WatchFacePineTimeStyle.h
@@ -79,7 +79,6 @@ namespace Pinetime {
lv_obj_t* dateDayOfWeek;
lv_obj_t* dateDay;
lv_obj_t* dateMonth;
- lv_obj_t* backgroundLabel;
lv_obj_t* plugIcon;
lv_obj_t* bleIcon;
lv_obj_t* calendarOuter;
diff --git a/src/displayapp/screens/WatchFaceTerminal.cpp b/src/displayapp/screens/WatchFaceTerminal.cpp
index 3a47fc53..80d736cf 100644
--- a/src/displayapp/screens/WatchFaceTerminal.cpp
+++ b/src/displayapp/screens/WatchFaceTerminal.cpp
@@ -59,13 +59,6 @@ WatchFaceTerminal::WatchFaceTerminal(DisplayApp* app,
lv_label_set_recolor(label_time, true);
lv_obj_align(label_time, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, -60);
- backgroundLabel = lv_label_create(lv_scr_act(), nullptr);
- lv_obj_set_click(backgroundLabel, true);
- lv_label_set_long_mode(backgroundLabel, LV_LABEL_LONG_CROP);
- lv_obj_set_size(backgroundLabel, 240, 240);
- lv_obj_set_pos(backgroundLabel, 0, 0);
- lv_label_set_text_static(backgroundLabel, "");
-
heartbeatValue = lv_label_create(lv_scr_act(), nullptr);
lv_label_set_recolor(heartbeatValue, true);
lv_obj_align(heartbeatValue, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, 20);
diff --git a/src/displayapp/screens/WatchFaceTerminal.h b/src/displayapp/screens/WatchFaceTerminal.h
index d236da34..828dbdb1 100644
--- a/src/displayapp/screens/WatchFaceTerminal.h
+++ b/src/displayapp/screens/WatchFaceTerminal.h
@@ -59,7 +59,6 @@ namespace Pinetime {
lv_obj_t* label_date;
lv_obj_t* label_prompt_1;
lv_obj_t* label_prompt_2;
- lv_obj_t* backgroundLabel;
lv_obj_t* batteryValue;
lv_obj_t* heartbeatValue;
lv_obj_t* stepValue;
diff --git a/src/displayapp/screens/settings/QuickSettings.cpp b/src/displayapp/screens/settings/QuickSettings.cpp
index 1ae6aa98..fe8f3cb4 100644
--- a/src/displayapp/screens/settings/QuickSettings.cpp
+++ b/src/displayapp/screens/settings/QuickSettings.cpp
@@ -104,12 +104,6 @@ QuickSettings::QuickSettings(Pinetime::Applications::DisplayApp* app,
lv_obj_set_style_local_text_font(lbl_btn, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &lv_font_sys_48);
lv_label_set_text_static(lbl_btn, Symbols::settings);
- lv_obj_t* backgroundLabel = lv_label_create(lv_scr_act(), nullptr);
- lv_label_set_long_mode(backgroundLabel, LV_LABEL_LONG_CROP);
- lv_obj_set_size(backgroundLabel, 240, 240);
- lv_obj_set_pos(backgroundLabel, 0, 0);
- lv_label_set_text_static(backgroundLabel, "");
-
taskUpdate = lv_task_create(lv_update_task, 5000, LV_TASK_PRIO_MID, this);
UpdateScreen();