1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 06:18:07 +00:00

core/tools: fix pixel-perfect mode for centered text in dialog-designer

This commit is contained in:
Andrew Kozlik 2020-06-09 13:31:42 +02:00
parent b9a311e831
commit d1690f4317

View File

@ -63,7 +63,7 @@ function text(ctx, x, y, text, bold, mono) {
function textCenter(ctx, x, y, text, bold, mono) {
setFont(ctx, bold, mono);
var w = ppMeasureWidth(ctx, text);
ctx.fillText(text, x - w / 2, y);
ppFillText(ctx, text, x - w / 2, y);
}
function render() {