Skip to content
Permalink
Browse files

Don't set app stylesheet font/font size if it isn't changed from

the default

Potentially avoids some hidpi scaling issues
  • Loading branch information
nyalldawson committed Oct 23, 2018
1 parent 728b9fc commit 4f432820db134914fae80bf4c8c96bcc4d44a70a
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/app/qgisappstylesheet.cpp
@@ -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

0 comments on commit 4f43282

Please sign in to comment.
You can’t perform that action at this time.