mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 14:28:07 +00:00
core/tools: fix pixel-perfect mode for centered text in dialog-designer
This commit is contained in:
parent
b9a311e831
commit
d1690f4317
@ -63,7 +63,7 @@ function text(ctx, x, y, text, bold, mono) {
|
|||||||
function textCenter(ctx, x, y, text, bold, mono) {
|
function textCenter(ctx, x, y, text, bold, mono) {
|
||||||
setFont(ctx, bold, mono);
|
setFont(ctx, bold, mono);
|
||||||
var w = ppMeasureWidth(ctx, text);
|
var w = ppMeasureWidth(ctx, text);
|
||||||
ctx.fillText(text, x - w / 2, y);
|
ppFillText(ctx, text, x - w / 2, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
function render() {
|
function render() {
|
||||||
|
Loading…
Reference in New Issue
Block a user