summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/InfiniPaint.cpp
diff options
context:
space:
mode:
authorJF002 <JF002@users.noreply.github.com>2020-10-11 15:05:01 (GMT)
committerGitHub <noreply@github.com>2020-10-11 15:05:01 (GMT)
commitda73938f4d3fe04cc116bdb4d4885c5916aacb0e (patch)
tree183422265545e6db4e20a7b263a505d3f59f729c /src/displayapp/screens/InfiniPaint.cpp
parentbb72712d376685143b57d321c6f967cbbca4c28e (diff)
parentfd110dabe82f100550a7538c0e3eb3a439c9a7d2 (diff)
Merge pull request #82 from Avamander/patch-6
Minor formatting, diagnostic and documentation changes
Diffstat (limited to 'src/displayapp/screens/InfiniPaint.cpp')
-rw-r--r--src/displayapp/screens/InfiniPaint.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/displayapp/screens/InfiniPaint.cpp b/src/displayapp/screens/InfiniPaint.cpp
index b340f5d..3ea75e9 100644
--- a/src/displayapp/screens/InfiniPaint.cpp
+++ b/src/displayapp/screens/InfiniPaint.cpp
@@ -7,9 +7,9 @@ using namespace Pinetime::Applications::Screens;
extern lv_font_t jetbrains_mono_extrabold_compressed;
extern lv_font_t jetbrains_mono_bold_20;
-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, LV_COLOR_WHITE);
+ std::fill(b, b + bufferSize, LV_COLOR_WHITE);
}
InfiniPaint::~InfiniPaint() {
@@ -33,10 +33,10 @@ bool InfiniPaint::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
bool InfiniPaint::OnTouchEvent(uint16_t x, uint16_t y) {
lv_area_t area;
- area.x1 = x-(width/2);
- area.y1 = y-(height/2);
- area.x2 = x+(width/2)-1;
- area.y2 = y+(height/2)-1;
+ area.x1 = x - (width / 2);
+ area.y1 = y - (height / 2);
+ area.x2 = x + (width / 2) - 1;
+ area.y2 = y + (height / 2) - 1;
lvgl.SetFullRefresh(Components::LittleVgl::FullRefreshDirections::None);
lvgl.FlushDisplay(&area, b);
return true;