Skip to content
Permalink
Browse files

Hidpi icon size fixes

  • Loading branch information
nyalldawson committed Feb 3, 2019
1 parent 1c92fd2 commit 15bcbf8c6a57fb533d9ef895def1c98adf81945c
Showing with 9 additions and 4 deletions.
  1. +4 −2 src/gui/qgsscalerangewidget.cpp
  2. +3 −0 src/gui/qgstextformatwidget.cpp
  3. +2 −2 src/ui/qgstextformatwidgetbase.ui
@@ -17,6 +17,7 @@
#include "qgsapplication.h"
#include "qgsproject.h"
#include "qgsscalewidget.h"
#include "qgsguiutils.h"

QgsScaleRangeWidget::QgsScaleRangeWidget( QWidget *parent )
: QWidget( parent )
@@ -36,10 +37,11 @@ QgsScaleRangeWidget::QgsScaleRangeWidget( QWidget *parent )
maxLbl->setToolTip( tr( "Maximum scale, i.e. most \"zoomed in\". "
"This limit is inclusive, that means the layer will be displayed on this scale." ) );

const int iconSize = QgsGuiUtils::scaleIconSize( 24 );
mMinimumScaleIconLabel = new QLabel( this );
mMinimumScaleIconLabel->setPixmap( QgsApplication::getThemePixmap( QStringLiteral( "/mActionZoomOut.svg" ) ) );
mMinimumScaleIconLabel->setPixmap( QgsApplication::getThemeIcon( QStringLiteral( "/mActionZoomOut.svg" ) ).pixmap( QSize( iconSize, iconSize ) ) );
mMaximumScaleIconLabel = new QLabel( this );
mMaximumScaleIconLabel->setPixmap( QgsApplication::getThemePixmap( QStringLiteral( "/mActionZoomIn.svg" ) ) );
mMaximumScaleIconLabel->setPixmap( QgsApplication::getThemeIcon( QStringLiteral( "/mActionZoomIn.svg" ) ).pixmap( QSize( iconSize, iconSize ) ) );

mMinimumScaleWidget = new QgsScaleWidget( this );
mMaximumScaleWidget = new QgsScaleWidget( this );
@@ -83,6 +83,7 @@ void QgsTextFormatWidget::initWidget()
const int iconSize = QgsGuiUtils::scaleIconSize( 20 );
mOptionsTab->setIconSize( QSize( iconSize, iconSize ) );
const int iconSize32 = QgsGuiUtils::scaleIconSize( 32 );
const int iconSize24 = QgsGuiUtils::scaleIconSize( 24 );
const int iconSize18 = QgsGuiUtils::scaleIconSize( 18 );
mPointOffsetAboveLeft->setIconSize( QSize( iconSize32, iconSize18 ) );
mPointOffsetAbove->setIconSize( QSize( iconSize32, iconSize18 ) );
@@ -93,6 +94,8 @@ void QgsTextFormatWidget::initWidget()
mPointOffsetBelowLeft->setIconSize( QSize( iconSize32, iconSize18 ) );
mPointOffsetBelow->setIconSize( QSize( iconSize32, iconSize18 ) );
mPointOffsetBelowRight->setIconSize( QSize( iconSize32, iconSize18 ) );
mLabelMinScale->setPixmap( QgsApplication::getThemeIcon( QStringLiteral( "/mActionZoomOut.svg" ) ).pixmap( QSize( iconSize24, iconSize24 ) ) );
mLabelMaxScale->setPixmap( QgsApplication::getThemeIcon( QStringLiteral( "/mActionZoomIn.svg" ) ).pixmap( QSize( iconSize24, iconSize24 ) ) );

const int buttonSize = QgsGuiUtils::scaleIconSize( 24 );
mFontUnderlineBtn->setMinimumSize( buttonSize, buttonSize );
@@ -5482,7 +5482,7 @@ font-style: italic;</string>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<widget class="QLabel" name="mLabelMinScale">
<property name="toolTip">
<string>Minimum scale, i.e. most &quot;zoomed out&quot;.</string>
</property>
@@ -5495,7 +5495,7 @@ font-style: italic;</string>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_11">
<widget class="QLabel" name="mLabelMaxScale">
<property name="toolTip">
<string>Maximum scale, i.e. most &quot;zoomed in&quot;.</string>
</property>

0 comments on commit 15bcbf8

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