Skip to content

Symbol preview and rendered symbol are different on hidpi systems #55349

Description

@raymondnijssen

What is the bug or the crash?

The symbol preview is wider/bigger than the rendered symbol on the map canvas.

Steps to reproduce the issue

  1. Open QGIS
  2. Create a line memory layer
  3. Draw a line
  4. Open the style panel (F7)
  5. Set width to 1

In QGIS 3.34, the width of the line in the preview is clearly wider than the width of the line in the map while in QGIS 3.22 they both have the same width.

Versions

<style type="text/css"> p, li { white-space: pre-wrap; } </style>
QGIS version 3.34.0-Prizren QGIS code revision ffbdd67
Qt version 5.15.3
Python version 3.10.12
GDAL/OGR version 3.4.1
PROJ version 8.2.1
EPSG Registry database version v10.041 (2021-12-03)
GEOS version 3.10.2-CAPI-1.16.0
SQLite version 3.37.2
PDAL version 2.3.0
PostgreSQL client version 14.9 (Ubuntu 14.9-0ubuntu0.22.04.1)
SpatiaLite version 5.0.1
QWT version 6.1.4
QScintilla2 version 2.11.6
OS version Ubuntu 22.04.3 LTS
       
Active Python plugins
grassprovider 2.12.99
MetaSearch 0.3.6
db_manager 0.1.20
processing 2.12.99
QGIS version 3.34.0-Prizren QGIS code revision [ffbdd67](https://github.com/qgis/QGIS/commit/ffbdd678812) Qt version 5.15.3 Python version 3.10.12 GDAL/OGR version 3.4.1 PROJ version 8.2.1 EPSG Registry database version v10.041 (2021-12-03) GEOS version 3.10.2-CAPI-1.16.0 SQLite version 3.37.2 PDAL version 2.3.0 PostgreSQL client version 14.9 (Ubuntu 14.9-0ubuntu0.22.04.1) SpatiaLite version 5.0.1 QWT version 6.1.4 QScintilla2 version 2.11.6 OS version Ubuntu 22.04.3 LTS

Active Python plugins
grassprovider
2.12.99
MetaSearch
0.3.6
db_manager
0.1.20
processing
2.12.99

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

Additional context

image
3.22

image
3.34

My display resolution is pretty high, 13" 4k screen and I'm wondering if some smart scaling could be the cause. The bug is pretty annoying while figuring out complex symbols with many layers as not every property seems to scale in the same way. For example the stroke width of a marker line is behaving weird. (Still trying to wrap my head around this.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugEither a bug report, or a bug fix. Let's hope for the latter!GUI/UXRelated to QGIS application GUI or User ExperienceSymbologyRelated to vector layer symbology or renderers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions