mirror of
https://git.sr.ht/~calebccff/pbsplash
synced 2026-01-12 20:48:40 -09:00
pbsplash: offset text slightly below the logo
This commit is contained in:
parent
b6625648c9
commit
0e626c1812
1 changed files with 3 additions and 1 deletions
|
|
@ -29,6 +29,8 @@
|
||||||
|
|
||||||
#define DEBUGRENDER 0
|
#define DEBUGRENDER 0
|
||||||
|
|
||||||
|
#define MM_TO_PX(dpi, mm) (dpi / 25.4) * mm
|
||||||
|
|
||||||
volatile sig_atomic_t terminate = 0;
|
volatile sig_atomic_t terminate = 0;
|
||||||
|
|
||||||
bool debug = false;
|
bool debug = false;
|
||||||
|
|
@ -327,7 +329,7 @@ int main(int argc, char **argv)
|
||||||
getTextDimensions(font, message, fontsz, &textWidth, &textHeight);
|
getTextDimensions(font, message, fontsz, &textWidth, &textHeight);
|
||||||
|
|
||||||
int tx = w / 2.f - textWidth / 2.f;
|
int tx = w / 2.f - textWidth / 2.f;
|
||||||
int ty = y + image_h + textHeight * 0.5f;
|
int ty = y + image_h + textHeight * 0.5f + MM_TO_PX(dpi, 2);
|
||||||
|
|
||||||
draw_text(font, message, tx, ty, textWidth, textHeight, fontsz, tfb_gray);
|
draw_text(font, message, tx, ty, textWidth, textHeight, fontsz, tfb_gray);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue