Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix blurry style icons in project properties dialog on hidpi displays #53373

Merged
merged 1 commit into from
Jun 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/app/qgsprojectproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,21 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas *mapCanvas, QWidget *pa
// and connecting QDialogButtonBox's accepted/rejected signals to dialog's accept/reject slots
initOptionsBase( false );

pixStyleMarker->setFixedSize( 24, 24 );
pixStyleMarker->load( QgsApplication::iconPath( QStringLiteral( "mIconPointLayer.svg" ) ) );

pixStyleFill->setFixedSize( 24, 24 );
pixStyleFill->load( QgsApplication::iconPath( QStringLiteral( "mIconPolygonLayer.svg" ) ) );

pixStyleLine->setFixedSize( 24, 24 );
pixStyleLine->load( QgsApplication::iconPath( QStringLiteral( "mIconLineLayer.svg" ) ) );

pixStyleColorRamp->setFixedSize( 24, 24 );
pixStyleColorRamp->load( QgsApplication::iconPath( QStringLiteral( "styleicons/color.svg" ) ) );

pixStyleTextFormat->setFixedSize( 24, 24 );
pixStyleTextFormat->load( QgsApplication::iconPath( QStringLiteral( "text.svg" ) ) );

mCoordinateDisplayComboBox->addItem( tr( "Map Units" ), static_cast<int>( Qgis::CoordinateDisplayType::MapCrs ) );
mCoordinateDisplayComboBox->addItem( tr( "Map Geographic (degrees)" ), static_cast<int>( Qgis::CoordinateDisplayType::MapGeographic ) );
mCoordinateDisplayComboBox->addItem( tr( "Custom Projection Units" ), static_cast<int>( Qgis::CoordinateDisplayType::CustomCrs ) );
Expand Down
45 changes: 10 additions & 35 deletions src/ui/qgsprojectpropertiesbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -1219,51 +1219,33 @@
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_14">
<widget class="QSvgWidget" name="pixStyleColorRamp">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../../images/images.qrc">:/images/themes/default/styleicons/color.svg</pixmap>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="pixStyleFill">
<widget class="QSvgWidget" name="pixStyleFill" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../../images/images.qrc">:/images/themes/default/mIconPolygonLayer.svg</pixmap>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="pixStyleLine">
<widget class="QSvgWidget" name="pixStyleLine" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../../images/images.qrc">:/images/themes/default/mIconLineLayer.svg</pixmap>
</property>
</widget>
</item>
<item row="2" column="4">
Expand Down Expand Up @@ -1303,19 +1285,13 @@
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="pixStyleMarker">
<widget class="QSvgWidget" name="pixStyleMarker" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../../images/images.qrc">:/images/themes/default/mIconPointLayer.svg</pixmap>
</property>
</widget>
</item>
<item row="0" column="2">
Expand Down Expand Up @@ -1377,19 +1353,13 @@
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_39">
<widget class="QSvgWidget" name="pixStyleTextFormat">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../../images/images.qrc">:/images/themes/default/text.svg</pixmap>
</property>
</widget>
</item>
<item row="4" column="2">
Expand Down Expand Up @@ -3531,6 +3501,11 @@
<header>qgsextentwidget.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>QSvgWidget</class>
<extends>QWidget</extends>
<header>qsvgwidget.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>mSearchLineEdit</tabstop>
Expand Down