From 3680e99634199157ecbd76ce97bb79d199eb16ef Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Sun, 20 Jun 2021 01:54:38 +0200 Subject: [PATCH] Fix temperature position, closes #52 --- examples/WatchFaces/7_SEG/Watchy_7_SEG.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/WatchFaces/7_SEG/Watchy_7_SEG.cpp b/examples/WatchFaces/7_SEG/Watchy_7_SEG.cpp index 7ce9207..8bbf362 100644 --- a/examples/WatchFaces/7_SEG/Watchy_7_SEG.cpp +++ b/examples/WatchFaces/7_SEG/Watchy_7_SEG.cpp @@ -102,8 +102,8 @@ void Watchy7SEG::drawWeather(){ display.setFont(&DSEG7_Classic_Regular_39); int16_t x1, y1; uint16_t w, h; - display.getTextBounds(String(temperature), 100, 150, &x1, &y1, &w, &h); - display.setCursor(155 - w, 150); + display.getTextBounds(String(temperature), 0, 0, &x1, &y1, &w, &h); + display.setCursor(159 - w - x1, 150); display.println(temperature); display.drawBitmap(165, 110, strcmp(TEMP_UNIT, "metric") == 0 ? celsius : fahrenheit, 26, 20, DARKMODE ? GxEPD_WHITE : GxEPD_BLACK); const unsigned char* weatherIcon;