Skip to content
Permalink
Browse files

Fix some undersized widgets on hidpi win builds

  • Loading branch information
nyalldawson committed Feb 20, 2018
1 parent 206f22b commit 2571de37bb9bdf5e293f71a8451bcebe85d4b289
Showing with 3 additions and 3 deletions.
  1. +1 −1 src/gui/qgscolorbutton.cpp
  2. +1 −1 src/gui/qgsfontbutton.cpp
  3. +1 −1 src/gui/qgssymbolbutton.cpp
@@ -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() ) );
}


@@ -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 ) );
}

@@ -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 ) );
}

0 comments on commit 2571de3

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