diff options
| author | JF <jf@codingfield.com> | 2021-05-21 09:38:38 (GMT) |
|---|---|---|
| committer | Gitea <gitea@fake.local> | 2021-05-21 09:38:38 (GMT) |
| commit | de69905c0647997091d9e385538c96de30be93e6 (patch) | |
| tree | 4775001d808da520c93a7552da1bea80e7714a30 /src/displayapp/screens/InfiniPaint.cpp | |
| parent | a80e782f267cd2424d22da23d809c0c6a8ff8761 (diff) | |
| parent | 7c9513be8a3bf36fda5706cb0fb1bd6232d42ffd (diff) | |
Merge branch 'develop' of JF/PineTime into master
Diffstat (limited to 'src/displayapp/screens/InfiniPaint.cpp')
| -rw-r--r-- | src/displayapp/screens/InfiniPaint.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/displayapp/screens/InfiniPaint.cpp b/src/displayapp/screens/InfiniPaint.cpp index b6a7e3e..3224008 100644 --- a/src/displayapp/screens/InfiniPaint.cpp +++ b/src/displayapp/screens/InfiniPaint.cpp @@ -4,7 +4,7 @@ using namespace Pinetime::Applications::Screens; -InfiniPaint::InfiniPaint(Pinetime::Applications::DisplayApp* app, Pinetime::Components::LittleVgl& lvgl) : Screen(app), lvgl{lvgl} { +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); } @@ -20,8 +20,8 @@ bool InfiniPaint::Refresh() { } bool InfiniPaint::OnTouchEvent(Pinetime::Applications::TouchEvents event) { - switch(event) { - case Pinetime::Applications::TouchEvents::LongTap: + switch (event) { + case Pinetime::Applications::TouchEvents::LongTap: switch (color) { case 0: selectColor = LV_COLOR_MAGENTA; @@ -47,13 +47,13 @@ bool InfiniPaint::OnTouchEvent(Pinetime::Applications::TouchEvents event) { case 7: selectColor = LV_COLOR_BLACK; break; - + default: color = 0; break; } - std::fill(b, b + bufferSize, selectColor); + std::fill(b, b + bufferSize, selectColor); color++; return true; default: @@ -72,4 +72,3 @@ bool InfiniPaint::OnTouchEvent(uint16_t x, uint16_t y) { lvgl.FlushDisplay(&area, b); return true; } - |
