summaryrefslogtreecommitdiff
path: root/src/displayapp/screens
diff options
context:
space:
mode:
authorRiku Isokoski <riksu9000@gmail.com>2021-07-15 21:07:55 (GMT)
committerRiku Isokoski <riksu9000@gmail.com>2021-07-15 21:07:55 (GMT)
commit2a3e1263906d1145d6b539ff019362f0077d8097 (patch)
tree1fdfa2947ccba67f1f62bf0660e6d578f35d366a /src/displayapp/screens
parent0d24d2b81e995d37bb7fb363df21a19b195107b8 (diff)
Fix most issues
Diffstat (limited to 'src/displayapp/screens')
-rw-r--r--src/displayapp/screens/InfiniPaint.cpp3
-rw-r--r--src/displayapp/screens/Metronome.cpp2
-rw-r--r--src/displayapp/screens/Paddle.cpp4
-rw-r--r--src/displayapp/screens/Screen.h1
4 files changed, 2 insertions, 8 deletions
diff --git a/src/displayapp/screens/InfiniPaint.cpp b/src/displayapp/screens/InfiniPaint.cpp
index 3224008..58bfa55 100644
--- a/src/displayapp/screens/InfiniPaint.cpp
+++ b/src/displayapp/screens/InfiniPaint.cpp
@@ -5,13 +5,10 @@
using namespace Pinetime::Applications::Screens;
InfiniPaint::InfiniPaint(Pinetime::Applications::DisplayApp* app, Pinetime::Components::LittleVgl& lvgl) : Screen(app), lvgl {lvgl} {
- app->SetTouchMode(DisplayApp::TouchModes::Polling);
std::fill(b, b + bufferSize, selectColor);
}
InfiniPaint::~InfiniPaint() {
- // Reset the touchmode
- app->SetTouchMode(DisplayApp::TouchModes::Gestures);
lv_obj_clean(lv_scr_act());
}
diff --git a/src/displayapp/screens/Metronome.cpp b/src/displayapp/screens/Metronome.cpp
index 15916b6..3e3f478 100644
--- a/src/displayapp/screens/Metronome.cpp
+++ b/src/displayapp/screens/Metronome.cpp
@@ -91,7 +91,7 @@ Metronome::~Metronome() {
}
bool Metronome::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
- return true;
+ return false;
}
bool Metronome::Refresh() {
diff --git a/src/displayapp/screens/Paddle.cpp b/src/displayapp/screens/Paddle.cpp
index 5a939ac..79e0c3d 100644
--- a/src/displayapp/screens/Paddle.cpp
+++ b/src/displayapp/screens/Paddle.cpp
@@ -5,8 +5,6 @@
using namespace Pinetime::Applications::Screens;
Paddle::Paddle(Pinetime::Applications::DisplayApp* app, Pinetime::Components::LittleVgl& lvgl) : Screen(app), lvgl {lvgl} {
- app->SetTouchMode(DisplayApp::TouchModes::Polling);
-
background = lv_obj_create(lv_scr_act(), nullptr);
lv_obj_set_size(background, LV_HOR_RES + 1, LV_VER_RES);
lv_obj_set_pos(background, -1, 0);
@@ -32,8 +30,6 @@ Paddle::Paddle(Pinetime::Applications::DisplayApp* app, Pinetime::Components::Li
}
Paddle::~Paddle() {
- // Reset the touchmode
- app->SetTouchMode(DisplayApp::TouchModes::Gestures);
lv_obj_clean(lv_scr_act());
}
diff --git a/src/displayapp/screens/Screen.h b/src/displayapp/screens/Screen.h
index 8e49c9d..6567a20 100644
--- a/src/displayapp/screens/Screen.h
+++ b/src/displayapp/screens/Screen.h
@@ -60,6 +60,7 @@ namespace Pinetime {
}
/** @return false if the event hasn't been handled by the app, true if it has been handled */
+ // Returning true will cancel lvgl tap
virtual bool OnTouchEvent(TouchEvents event) {
return false;
}