Browse Source

splashscreen: Resize text to fit exactly

0.13
Luke Dashjr 9 years ago
parent
commit
78ec83ddfe
  1. 5
      src/qt/splashscreen.cpp

5
src/qt/splashscreen.cpp

@ -80,9 +80,8 @@ SplashScreen::SplashScreen(Qt::WindowFlags f, const NetworkStyle *networkStyle) @@ -80,9 +80,8 @@ SplashScreen::SplashScreen(Qt::WindowFlags f, const NetworkStyle *networkStyle)
pixPaint.setFont(QFont(font, 33*fontFactor));
QFontMetrics fm = pixPaint.fontMetrics();
int titleTextWidth = fm.width(titleText);
if(titleTextWidth > 160) {
// strange font rendering, Arial probably not found
fontFactor = 0.75;
if (titleTextWidth > 176) {
fontFactor = fontFactor * 176 / titleTextWidth;
}
pixPaint.setFont(QFont(font, 33*fontFactor));

Loading…
Cancel
Save