From f3b13dcaac9a51cb666b820a839bb84acf3e6639 Mon Sep 17 00:00:00 2001 From: Andrew Kozlik Date: Tue, 17 Dec 2019 00:16:18 +0100 Subject: [PATCH] fix(legacy): Fix incorrect constants in layoutButtonNo(). --- legacy/layout.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/legacy/layout.c b/legacy/layout.c index 51c8bfefb2..636044d6c0 100644 --- a/legacy/layout.c +++ b/legacy/layout.c @@ -23,19 +23,20 @@ #include "oled.h" void layoutButtonNo(const char *btnNo, const BITMAP *icon) { - int icon_width = 0; + int icon_width = -2; if (icon) { oledDrawBitmap(1, OLED_HEIGHT - 8, icon); icon_width = icon->width; } - oledDrawString(3 + icon_width, OLED_HEIGHT - 8, btnNo, FONT_STANDARD); + oledDrawString(icon_width + 3, OLED_HEIGHT - icon_width, btnNo, + FONT_STANDARD); oledInvert(0, OLED_HEIGHT - 9, - icon_width + oledStringWidth(btnNo, FONT_STANDARD) + 4, + icon_width + oledStringWidth(btnNo, FONT_STANDARD) + 2, OLED_HEIGHT - 1); } void layoutButtonYes(const char *btnYes, const BITMAP *icon) { - int icon_width = 0; + int icon_width = -3; if (icon) { oledDrawBitmap(OLED_WIDTH - 8 - 1, OLED_HEIGHT - 8, icon); icon_width = icon->width;