mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-06-30 20:02:34 +00:00
fix(legacy): Fix incorrect constants in layoutButtonNo().
This commit is contained in:
parent
87218a63f9
commit
f3b13dcaac
@ -23,19 +23,20 @@
|
|||||||
#include "oled.h"
|
#include "oled.h"
|
||||||
|
|
||||||
void layoutButtonNo(const char *btnNo, const BITMAP *icon) {
|
void layoutButtonNo(const char *btnNo, const BITMAP *icon) {
|
||||||
int icon_width = 0;
|
int icon_width = -2;
|
||||||
if (icon) {
|
if (icon) {
|
||||||
oledDrawBitmap(1, OLED_HEIGHT - 8, icon);
|
oledDrawBitmap(1, OLED_HEIGHT - 8, icon);
|
||||||
icon_width = icon->width;
|
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,
|
oledInvert(0, OLED_HEIGHT - 9,
|
||||||
icon_width + oledStringWidth(btnNo, FONT_STANDARD) + 4,
|
icon_width + oledStringWidth(btnNo, FONT_STANDARD) + 2,
|
||||||
OLED_HEIGHT - 1);
|
OLED_HEIGHT - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void layoutButtonYes(const char *btnYes, const BITMAP *icon) {
|
void layoutButtonYes(const char *btnYes, const BITMAP *icon) {
|
||||||
int icon_width = 0;
|
int icon_width = -3;
|
||||||
if (icon) {
|
if (icon) {
|
||||||
oledDrawBitmap(OLED_WIDTH - 8 - 1, OLED_HEIGHT - 8, icon);
|
oledDrawBitmap(OLED_WIDTH - 8 - 1, OLED_HEIGHT - 8, icon);
|
||||||
icon_width = icon->width;
|
icon_width = icon->width;
|
||||||
|
Loading…
Reference in New Issue
Block a user