Skip to content

Commit

Permalink
Don't set app stylesheet font/font size if it isn't changed from
Browse files Browse the repository at this point in the history
the default

Potentially avoids some hidpi scaling issues
  • Loading branch information
nyalldawson committed Oct 25, 2018
1 parent 728b9fc commit 4f43282
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/qgisappstylesheet.cpp
Expand Up @@ -103,7 +103,10 @@ void QgisAppStyleSheet::buildStyleSheet( const QMap<QString, QVariant> &opts )
QgsDebugMsg( QStringLiteral( "fontFamily: %1" ).arg( fontFamily ) );
if ( fontFamily.isEmpty() ) { return; }

ss += QStringLiteral( "* { font: %1pt \"%2\"} " ).arg( fontSize, fontFamily );
const QString defaultSize = QString::number( mDefaultFont.pointSize() );
const QString defaultFamily = mDefaultFont.family();
if ( fontSize != defaultSize || fontFamily != defaultFamily )
ss += QStringLiteral( "* { font: %1pt \"%2\"} " ).arg( fontSize, fontFamily );

#if QT_VERSION >= 0x050900
// Fix for macOS Qt 5.9+, where close boxes do not show on document mode tab bar tabs
Expand Down

0 comments on commit 4f43282

Please sign in to comment.