v2.6.1: Fix "highest flight today" layout collision on Statistics screen

The v2.6.0 addition was drawn as a single line that could overflow
and collide with the "Reset logbook data" button. It now uses the
same two-line drawStatRow() layout (label + value) as the other
stats, with all row Y positions shifted up slightly to make room,
and the i18n strings dropped their now-redundant ": " suffix since
drawStatRow() renders label and value on separate lines.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Eiswolf-BG
2026-08-06 16:03:49 +02:00
parent b7362f4fba
commit 81d11ad954
7 changed files with 13 additions and 14 deletions

View File

@@ -117,7 +117,7 @@ static const char* const I18N_DE[] = {
"Nochmal tippen zum Bestätigen!",
"Flugbuch-Daten zurückgesetzt.",
"Laufzeit: ",
"Höchster Flug heute: ",
"Höchster Flug heute",
"Verlauf (letzte 7 Tage)",
"Noch keine Flugbuch-Einträge.",
"Wie der Verlauf funktioniert",

View File

@@ -118,7 +118,7 @@ static const char* const I18N_EN[] = {
"Tap again to confirm!",
"Logbook data reset.",
"Uptime: ",
"Highest flight today: ",
"Highest flight today",
"History (last 7 days)",
"No logbook entries yet.",
"How the history chart works",

View File

@@ -117,7 +117,7 @@ static const char* const I18N_ES[] = {
"¡Toque de nuevo para confirmar!",
"Registro reiniciado.",
"Tiempo activo: ",
"Vuelo más alto hoy: ",
"Vuelo más alto hoy",
"Historial (últimos 7 días)",
"Aún no hay registros.",
"Cómo funciona el historial",

View File

@@ -117,7 +117,7 @@ static const char* const I18N_FR[] = {
"Retouchez pour confirmer !",
"Journal réinitialisé.",
"Durée de fonctionnement : ",
"Vol le plus haut aujourd'hui : ",
"Vol le plus haut aujourd'hui",
"Historique (7 derniers jours)",
"Aucune entrée pour le moment.",
"Comment fonctionne l'historique",

View File

@@ -117,7 +117,7 @@ static const char* const I18N_IT[] = {
"Tocca di nuovo per confermare!",
"Registro reimpostato.",
"Tempo di attività: ",
"Volo più alto oggi: ",
"Volo più alto oggi",
"Cronologia (ultimi 7 giorni)",
"Ancora nessun dato.",
"Come funziona la cronologia",

View File

@@ -117,7 +117,7 @@ static const char* const I18N_TR[] = {
"Onaylamak için tekrar dokunun!",
"Kayıt defteri sıfırlandı.",
"Çalışma süresi: ",
"Bugünkü en yüksek uçuş: ",
"Bugünkü en yüksek uçuş",
"Geçmiş (son 7 gün)",
"Henüz kayıt yok.",
"Geçmiş grafiği nasıl çalışır",

View File

@@ -36,12 +36,12 @@ namespace {
constexpr uint32_t CONFIRM_WINDOW_MS = 4000;
constexpr int16_t ROW1_Y = 40;
constexpr int16_t ROW2_Y = 76;
constexpr int16_t ROW3_Y = 112;
constexpr int16_t ROW4_Y = 148;
constexpr int16_t UPTIME_Y = 184;
constexpr int16_t TOP_ALT_Y = 204; // "Hoechster Flug heute" - einzeilig, daher naeher an UPTIME als die anderen Rows
constexpr int16_t ROW1_Y = 38;
constexpr int16_t ROW2_Y = 72;
constexpr int16_t ROW3_Y = 106;
constexpr int16_t ROW4_Y = 140;
constexpr int16_t UPTIME_Y = 174;
constexpr int16_t TOP_ALT_Y = 194; // zweizeilig wie drawStatRow (Label + Wert)
}
void run(TFT_eSPI& tft) {
@@ -100,8 +100,7 @@ void run(TFT_eSPI& tft) {
String csign = topAlt.callsign[0] ? String(topAlt.callsign) : "?";
char altBuf[24];
snprintf(altBuf, sizeof(altBuf), "%s (%ld ft)", csign.c_str(), (long)topAlt.altitudeFt);
tft.setCursor(10, TOP_ALT_Y);
tft.print(String(I18n::t(StringId::STATS_TOP_ALTITUDE_PREFIX)) + altBuf);
drawStatRow(tft, TOP_ALT_Y, I18n::t(StringId::STATS_TOP_ALTITUDE_PREFIX), String(altBuf));
}
if (confirmPending) {