Bug 390556 - plasma-workspace lookandfeel needs to be ported to QtQuickControls2 to support HiDPI screens
Summary: plasma-workspace lookandfeel needs to be ported to QtQuickControls2 to suppor...
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_lookandfeel (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-16 13:01 UTC by Andreas Schneider
Modified: 2018-04-25 21:45 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.13.0


Attachments
LockScreen (2.94 MB, image/png)
2018-02-16 13:26 UTC, Andreas Schneider
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schneider 2018-02-16 13:01:57 UTC
Hi,

e.g. the locksreen (ctrl+alt+del) has blurry images and fonts because it ist uses QtQuick.Controls 1.x. Switching to version 2.2 (or 2.3, Qt 5.10) would fix that. We just did that to fix the elisa music player.

find lookandfeel/contents/ -name "*.qml" | xargs grep QtQuick.Controls

lookandfeel/contents/components/KeyboardLayoutButton.qml:import QtQuick.Controls 1.1 as QQC
lookandfeel/contents/components/SessionManagementScreen.qml:import QtQuick.Controls 1.1
lookandfeel/contents/lockscreen/LockScreen.qml:import QtQuick.Controls 1.1
lookandfeel/contents/lockscreen/LockScreenUi.qml:import QtQuick.Controls 1.1
lookandfeel/contents/lockscreen/MainBlock.qml:import QtQuick.Controls 1.1
lookandfeel/contents/lockscreen/config.qml:import QtQuick.Controls 2.0
lookandfeel/contents/logout/Logout.qml:import QtQuick.Controls 1.1 as Controls
lookandfeel/contents/userswitcher/UserSwitcher.qml:import QtQuick.Controls 1.1 as Controls
Comment 1 Andreas Schneider 2018-02-16 13:26:08 UTC
Created attachment 110718 [details]
LockScreen
Comment 2 David Edmundson 2018-02-16 13:45:43 UTC
That has nothing to do with QtQuick Controls 1 or 2.
Comment 3 David Edmundson 2018-02-16 13:49:23 UTC
What exactly is the problem?
Comment 4 Andreas Schneider 2018-02-19 18:03:35 UTC
Warning: Qt Quick Controls 1.x are not compatible with Qt's automatic
         high-DPI scaling. There is currently no available solution
         for high-DPI support in applications wishing to mix Qt Quick
         Controls and Qt Quick Controls 2.

Quoted from: https://doc.qt.io/qt-5/qtquickcontrols2-highdpi.html

The fonts and icons look blurry, here is a screenshot:
https://xor.cryptomilk.org/plasma_lockscreen.png


The same problem had Elisa with Qt Quick Controls v1:
https://xor.cryptomilk.org/elisa/elisa.png

And this is how it looks after switchting to Qt Quick Controls 2.2
https://xor.cryptomilk.org/elisa/elisa-controls2.png
Comment 5 David Edmundson 2018-02-19 19:10:57 UTC
Labels (which we're talking about here) are just subclasses of QQuickItem.Text

It just so happens that Kirigami's desktop-theme sets a different renderType.

Won't make a difference for the lock screen, as we're use the Plasma components and Plasma labels.

Main QQC thing we're using is StackView and Action which are GUI-less anyway.
Porting to Plamsa Components3 (which is QQC2 confusingly) also has the same render type as it does now.
Comment 6 Andreas Schneider 2018-02-20 11:55:48 UTC
So it uses a bad text rendering type which doesn't support scaling correctly?

Native instead of Qt?
Comment 7 Nate Graham 2018-03-11 22:25:32 UTC
Yes, Text.NativeRendering is affected by a bug for non-integer scale factors that causes this issue: https://bugreports.qt.io/browse/QTBUG-67007

The QQC2-desktop-style package works around this bug by forcing the use of Text.QtRendering, which works fine. However that only works for QQC2 controls, not QQC1 controls or PlasmaComponents controls, which is what are used in the logout overlay. I have submitted a patch to resolve that: https://phabricator.kde.org/D11244

Though this bug was originally filed against the logout overlay, it looks like it's now tracking the Look & Feel KCM. The logout overlay issue is tracked by Bug 391691, and should be fixed by my patch.