From 69c6a34ead08410eee37000d7405f287aa416548 Mon Sep 17 00:00:00 2001 From: Balint Kovacs Date: Sun, 28 Nov 2021 15:46:02 +0000 Subject: [PATCH] Fix some text overflowing the screen in recorder and gpsrec On Bangle.js 2 --- apps/gpsrec/app.js | 6 +++--- apps/recorder/app.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/gpsrec/app.js b/apps/gpsrec/app.js index 164124257..73fe6194e 100644 --- a/apps/gpsrec/app.js +++ b/apps/gpsrec/app.js @@ -249,10 +249,10 @@ function plotTrack(info) { g.fillCircle(ox,oy,5); if (info.qOSTM) g.setColor(0, 0, 0); else g.setColor(1,1,1); - g.drawString(require("locale").distance(dist),120,220); + g.drawString(require("locale").distance(dist),g.getWidth() / 2, g.getHeight() - 20); g.setFont("6x8",2); g.setFontAlign(0,0,3); - g.drawString("Back",230,200); + g.drawString("Back",g.getWidth() - 10, g.getHeight() - 40); setWatch(function() { viewTrack(info.fn, info); }, global.BTN3||BTN1); @@ -336,7 +336,7 @@ function plotGraph(info, style) { }); g.setFont("6x8",2); g.setFontAlign(0,0,3); - g.drawString("Back",230,200); + g.drawString("Back",g.getWidth() - 10, g.getHeight() - 40); setWatch(function() { viewTrack(info.fn, info); }, global.BTN3||BTN1); diff --git a/apps/recorder/app.js b/apps/recorder/app.js index d29959e25..3d06ebca4 100644 --- a/apps/recorder/app.js +++ b/apps/recorder/app.js @@ -304,10 +304,10 @@ function plotTrack(info) { g.fillCircle(ox,oy,5); if (info.qOSTM) g.setColor("#000"); else g.setColor(g.theme.fg); - g.drawString(require("locale").distance(dist),120,220); + g.drawString(require("locale").distance(dist),g.getWidth() / 2, g.getHeight() - 20); g.setFont("6x8",2); g.setFontAlign(0,0,3); - g.drawString("Back",230,200); + g.drawString("Back",g.getWidth() - 10, g.getHeight() - 40); setWatch(function() { viewTrack(info.fn, info); }, global.BTN3||BTN1); @@ -402,7 +402,7 @@ function plotGraph(info, style) { }); g.setFont("6x8",2); g.setFontAlign(0,0,3); - g.drawString("Back",230,200); + g.drawString("Back",g.getWidth() - 10, g.getHeight() - 40); setWatch(function() { viewTrack(info.filename, info); }, global.BTN3||BTN1);