Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix some undersized widgets on hidpi win builds
  • Loading branch information
nyalldawson committed Feb 20, 2018
1 parent 206f22b commit 2571de3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/gui/qgscolorbutton.cpp
Expand Up @@ -62,7 +62,7 @@ QgsColorButton::QgsColorButton( QWidget *parent, const QString &cdt, QgsColorSch
mMinimumSize = QSize( 120, 28 );
#endif

mMinimumSize.setHeight( std::max( static_cast<int>( fontMetrics().height() * 1.1 ), mMinimumSize.height() ) );
mMinimumSize.setHeight( std::max( static_cast<int>( Qgis::UI_SCALE_FACTOR * fontMetrics().height() * 1.1 ), mMinimumSize.height() ) );
}


Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsfontbutton.cpp
Expand Up @@ -49,7 +49,7 @@ QgsFontButton::QgsFontButton( QWidget *parent, const QString &dialogTitle )

//make sure height of button looks good under different platforms
QSize size = QToolButton::minimumSizeHint();
int fontHeight = fontMetrics().height() * 1.4;
int fontHeight = Qgis::UI_SCALE_FACTOR * fontMetrics().height() * 1.4;
mSizeHint = QSize( size.width(), std::max( size.height(), fontHeight ) );
}

Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgssymbolbutton.cpp
Expand Up @@ -45,7 +45,7 @@ QgsSymbolButton::QgsSymbolButton( QWidget *parent, const QString &dialogTitle )

//make sure height of button looks good under different platforms
QSize size = QToolButton::minimumSizeHint();
int fontHeight = fontMetrics().height() * 1.4;
int fontHeight = Qgis::UI_SCALE_FACTOR * fontMetrics().height() * 1.4;
mSizeHint = QSize( size.width(), std::max( size.height(), fontHeight ) );
}

Expand Down

0 comments on commit 2571de3

Please sign in to comment.