diff options
| author | Luke Dashjr <[email protected]> | 2016-01-27 20:28:04 +0000 |
|---|---|---|
| committer | Luke Dashjr <[email protected]> | 2016-01-27 20:29:18 +0000 |
| commit | 78ec83ddfe0e49d18c572b37681e60b9435b2ab4 (patch) | |
| tree | 55125e7106e254df6924afa0624937d5078edde3 /src/qt/splashscreen.cpp | |
| parent | Bugfix: Actually use _COPYRIGHT_HOLDERS_SUBSTITUTION everywhere (diff) | |
| download | discoin-78ec83ddfe0e49d18c572b37681e60b9435b2ab4.tar.xz discoin-78ec83ddfe0e49d18c572b37681e60b9435b2ab4.zip | |
splashscreen: Resize text to fit exactly
Diffstat (limited to 'src/qt/splashscreen.cpp')
| -rw-r--r-- | src/qt/splashscreen.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp index facee62ea..4d745088a 100644 --- a/src/qt/splashscreen.cpp +++ b/src/qt/splashscreen.cpp @@ -79,10 +79,9 @@ SplashScreen::SplashScreen(Qt::WindowFlags f, const NetworkStyle *networkStyle) // check font size and drawing with 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; + int titleTextWidth = fm.width(titleText); + if (titleTextWidth > 176) { + fontFactor = fontFactor * 176 / titleTextWidth; } pixPaint.setFont(QFont(font, 33*fontFactor)); |