mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-28 17:18:29 +00:00
core: fix last commit
This commit is contained in:
parent
c761351afa
commit
a89a3bf6db
@ -362,7 +362,7 @@ void display_loader(uint16_t progress, bool indeterminate, int yoffset,
|
|||||||
}
|
}
|
||||||
// inside of circle - draw glyph
|
// inside of circle - draw glyph
|
||||||
#define LOADER_ICON_CORNER_CUT 2
|
#define LOADER_ICON_CORNER_CUT 2
|
||||||
#define LOADER_INDETERMINATE_WIDTH 125
|
#define LOADER_INDETERMINATE_WIDTH 100
|
||||||
if (icon &&
|
if (icon &&
|
||||||
mx + my > (((LOADER_ICON_SIZE / 2) + LOADER_ICON_CORNER_CUT) * 2) &&
|
mx + my > (((LOADER_ICON_SIZE / 2) + LOADER_ICON_CORNER_CUT) * 2) &&
|
||||||
mx >= img_loader_size - (LOADER_ICON_SIZE / 2) &&
|
mx >= img_loader_size - (LOADER_ICON_SIZE / 2) &&
|
||||||
@ -380,8 +380,8 @@ void display_loader(uint16_t progress, bool indeterminate, int yoffset,
|
|||||||
} else {
|
} else {
|
||||||
uint8_t c;
|
uint8_t c;
|
||||||
if (indeterminate) {
|
if (indeterminate) {
|
||||||
uint16_t diff = (progress > a) ? (progress - a) : (a - progress);
|
uint16_t diff = (progress > a) ? (progress - a) : (1000 + progress - a);
|
||||||
if (diff < LOADER_INDETERMINATE_WIDTH) {
|
if (diff < LOADER_INDETERMINATE_WIDTH || diff > 1000 - LOADER_INDETERMINATE_WIDTH) {
|
||||||
c = (img_loader[my][mx] & 0x00F0) >> 4;
|
c = (img_loader[my][mx] & 0x00F0) >> 4;
|
||||||
} else {
|
} else {
|
||||||
c = img_loader[my][mx] & 0x000F;
|
c = img_loader[my][mx] & 0x000F;
|
||||||
|
@ -176,6 +176,6 @@ async def live_refresh_step(ctx, current):
|
|||||||
step = 8
|
step = 8
|
||||||
p = (1000 * current // step) % 1000
|
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.text_center(ui.WIDTH // 2, 145, "%d" % current, ui.NORMAL, ui.FG, ui.BG)
|
||||||
ui.display.refresh()
|
ui.display.refresh()
|
||||||
|
Loading…
Reference in New Issue
Block a user