1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-13 19:18:56 +00:00

core: fix last commit

This commit is contained in:
Pavol Rusnak 2019-04-23 19:54:03 +02:00
parent c761351afa
commit a89a3bf6db
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
2 changed files with 4 additions and 4 deletions

View File

@ -362,7 +362,7 @@ void display_loader(uint16_t progress, bool indeterminate, int yoffset,
}
// inside of circle - draw glyph
#define LOADER_ICON_CORNER_CUT 2
#define LOADER_INDETERMINATE_WIDTH 125
#define LOADER_INDETERMINATE_WIDTH 100
if (icon &&
mx + my > (((LOADER_ICON_SIZE / 2) + LOADER_ICON_CORNER_CUT) * 2) &&
mx >= img_loader_size - (LOADER_ICON_SIZE / 2) &&
@ -380,8 +380,8 @@ void display_loader(uint16_t progress, bool indeterminate, int yoffset,
} else {
uint8_t c;
if (indeterminate) {
uint16_t diff = (progress > a) ? (progress - a) : (a - progress);
if (diff < LOADER_INDETERMINATE_WIDTH) {
uint16_t diff = (progress > a) ? (progress - a) : (1000 + progress - a);
if (diff < LOADER_INDETERMINATE_WIDTH || diff > 1000 - LOADER_INDETERMINATE_WIDTH) {
c = (img_loader[my][mx] & 0x00F0) >> 4;
} else {
c = img_loader[my][mx] & 0x000F;

View File

@ -176,6 +176,6 @@ async def live_refresh_step(ctx, current):
step = 8
p = (1000 * current // step) % 1000
ui.display.loader(p, True, 18, ui.WHITE, ui.BG, None, 0)
ui.display.loader(p, True, 18, ui.WHITE, ui.BG)
ui.display.text_center(ui.WIDTH // 2, 145, "%d" % current, ui.NORMAL, ui.FG, ui.BG)
ui.display.refresh()