Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-122910

Hinting is bad with fractional scaling, Wayland and hintfull

    XMLWordPrintable

Details

    • Linux/Wayland
    • e7ddd490c (dev), cdee812bd (6.7), 2079949b4 (6.6)

    Description

      I've updated Plasma to 6.0 and noticed this:

      This happens with both QtQuick and QtWidgets applications and stops happening if I do any of the following:

      • change system hinting settings from hintfull to hintslight
      • set QT_QPA_PLATFORM=xcb
      • set QT_SCALE_FACTOR=1.01 (the logic here is to make QHighDPiScaling::isActive() return true)
      • set QT_WAYLAND_DISABLED_INTERFACES=wp_fractional_scale_manager_v1 (so applications scale to 2x instead of 1.25x)

      My system scaling is 125% and it's systemsettings on the screenshot.

      My guess is that those changes should apply on Wayland, too:
      https://github.com/qt/qtbase/commit/0f7bc885aa7ae8cc3c448cc751aba4eba8c1c8b8
      https://github.com/qt/qtbase/commit/7c506150a52031877145daceb032ccb882fd0a1b

      They currently don't as Qt's coordinate system is equal to the windowing system coordinate system on Wayland and so QHighDpiScaling::isActive() returns false. Still, QPainter is scaled what apparently leads to such bad results. To make this logic work on Wayland, QHighDpiScaling::isActive() should be replaced with !qFuzzyCompare(QGuiApplication::devicePixelRatio(), qreal(1)).

      Although it's just a guess, not sure whether it's the right fix.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            ilya-fedin Ilya Fedin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes