mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
splashscreen: Resize text to fit exactly
This commit is contained in:
parent
3cae14056a
commit
78ec83ddfe
@ -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…
Reference in New Issue
Block a user