Bug 407689 - Preview of sddm themes and icons look pixelated in "Startup and Shutdown" when fractional display scale is used
Summary: Preview of sddm themes and icons look pixelated in "Startup and Shutdown" whe...
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_sddm (show other bugs)
Version: 5.18.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Filip Fila
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-18 13:53 UTC by Patrick Silva
Modified: 2021-01-11 16:25 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.17.1


Attachments
screenshot (311.45 KB, image/png)
2019-05-18 13:53 UTC, Patrick Silva
Details
standalone kcm - worst (174.99 KB, image/jpeg)
2019-05-21 22:06 UTC, Patrick Silva
Details
kcm in system settings (189.84 KB, image/jpeg)
2019-05-21 22:06 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2019-05-18 13:53:22 UTC
Created attachment 120167 [details]
screenshot

STEPS TO REPRODUCE
1. open system settings > display and monitor > "Scale display" button and set display scale factor to 1.2
2. restart plasma
3. open system settings in icon view mode
4. open "Startup and Shutdown"

OBSERVED RESULT
As we can see in the attached screenshot, preview of sddm themes and icons look pixelated

EXPECTED RESULT
preview of sddm themes and icons look crisp

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.15.90
KDE Frameworks Version: 5.58.0
Qt Version: 5.13.0 beta3
Comment 1 Filip Fila 2019-05-21 18:46:10 UTC
I can't reproduce this in KDE Neon Unstable Dev: https://i.imgur.com/wZAJpXV.png

And I can't reproduce it in Manjaro that has 5.15. 

If you have Neon somewhere could you please try there so we can see if it's Qt 5.13 that's creating the difference.
Comment 2 Patrick Silva 2019-05-21 22:06:05 UTC
Created attachment 120231 [details]
standalone kcm - worst

Same thing on neon dev unstable with Qt 5.12.
Standalone kcm looks worst, see "No preview available" text.
Comment 3 Patrick Silva 2019-05-21 22:06:40 UTC
Created attachment 120232 [details]
kcm in system settings
Comment 4 Filip Fila 2019-05-22 13:57:58 UTC
I've finally reproduced it, but restarting plasmashell wasn't enough, I had to log out. 

Before log out: https://i.imgur.com/lFacva1.png

After log in: https://i.imgur.com/gfTfvGF.png

Note how even the preview image is affected.(The coloring bug is a VirtualBox bug)

The fact that it works and then doesn't makes me think it's a general problem we have with scaling, not with the code specific to this KCM. I'm tagging David as he should know a lot more.
Comment 5 Patrick Silva 2019-05-22 14:03:46 UTC
Yes, step 2 was not clear.
I meant "restart plasma session".
Sorry.
Comment 6 Filip Fila 2019-05-22 14:05:08 UTC
On the other hand, I can't reproduce it in 5.15 even after logging out and then in again. Patrick, can you also confirm that the bug is not present in 5.15? 

If not, the only suspect I see is: https://phabricator.kde.org/R123:5a973f13fd6115e67c11ecf9f4624a42800b68d4
Comment 7 Patrick Silva 2019-05-22 14:12:55 UTC
yes, I can.

Operating System: Arch Linux 
KDE Plasma Version: 5.15.5
KDE Frameworks Version: 5.58.0
Qt Version: 5.12.3
Comment 8 Patrick Silva 2019-05-22 14:13:50 UTC
ops, the bug also is present in plasma 5.15.5.
Comment 9 David Edmundson 2019-10-13 16:15:38 UTC
Git commit 9e0f846727488cf4aff7fb45a5463a92bb1f5cd2 by David Edmundson.
Committed on 13/10/2019 at 16:15.
Pushed by davidedmundson into branch 'Plasma/5.17'.

Set preview to correct device size

Summary:
QQuickImage::sourceSize is in device pixels for pixmap images.

Converting is the responsibility of the calling code.

Test Plan:
QT_SCALE_FACTOR=1.5 kcmshell5 sddm
Looked at image

Reviewers: #plasma, apol

Reviewed By: apol

Subscribers: ngraham, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D24591

M  +3    -2    src/qml/main.qml

https://commits.kde.org/sddm-kcm/9e0f846727488cf4aff7fb45a5463a92bb1f5cd2
Comment 10 Patrick Silva 2019-10-22 21:19:49 UTC
This issue persists after update to Plasma 5.17.1.

Operating System: Arch Linux 
KDE Plasma Version: 5.17.1
KDE Frameworks Version: 5.63.0
Qt Version: 5.13.1
Comment 11 Filip Fila 2020-03-06 16:00:32 UTC
Yunhe, you've been working on HiDPI improvements in Plasma, would you be interested in fixing this?
Comment 12 David Redondo 2021-01-11 16:25:49 UTC
Git commit 5bbbe08748e0b1ecf48ea4af35b96fa23ccd0a0c by David Redondo.
Committed on 11/01/2021 at 12:42.
Pushed by ngraham into branch 'master'.

Port to ManagedConfigModule

The settings are now read via KConfigXT, with a trick to follow the config
scheme of SDDM. One KConfig object is used to read the defaults and another one
to read the actual config values, see SddmSettingsBase.h for details.
The UI is now entirely in Qml and follows the GridviewKCM style. The preview pane
has been moved into a Dialog. The "Advanced" has been moved into a page called
"Behavior" and the sync options live now in a OverlaySheet accessible from the main
page as does the background configuration.
Related: bug 403530, bug 411004, bug 411504, bug 419327, bug 424639

M  +2    -0    CMakeLists.txt
M  +10   -16   src/CMakeLists.txt
D  +0    -294  src/advancedconfig.cpp
D  +0    -63   src/advancedconfig.h
D  +0    -97   src/configwidgets/selectimagebutton.cpp
D  +0    -50   src/configwidgets/selectimagebutton.h
A  +196  -0    src/package/contents/ui/Advanced.qml     [License: GPL]
A  +98   -0    src/package/contents/ui/DetailsDialog.qml     [License: GPL (v2+)]
A  +211  -0    src/package/contents/ui/main.qml     [License: GPL]
A  +16   -0    src/package/metadata.desktop
D  +0    -147  src/qml/main.qml
A  +42   -0    src/sddmdata.cpp     [License: GPL]
A  +33   -0    src/sddmdata.h     [License: GPL]
M  +247  -57   src/sddmkcm.cpp
M  +22   -12   src/sddmkcm.h
A  +39   -0    src/sddmsettings.kcfg
A  +8    -0    src/sddmsettings.kcfgc
A  +81   -0    src/sddmsettingsbase.cpp     [License: GPL]
A  +51   -0    src/sddmsettingsbase.h     [License: GPL]
D  +0    -237  src/themeconfig.cpp
D  +0    -63   src/themeconfig.h
M  +9    -0    src/thememetadata.cpp
M  +1    -0    src/thememetadata.h
D  +0    -155  src/themesdelegate.cpp
D  +0    -47   src/themesdelegate.h
M  +80   -2    src/themesmodel.cpp
M  +16   -3    src/themesmodel.h
D  +0    -356  src/ui/advancedconfig.ui
D  +0    -223  src/ui/themeconfig.ui
M  +5    -4    src/usersmodel.cpp
M  +4    -2    src/usersmodel.h

https://invent.kde.org/plasma/sddm-kcm/commit/5bbbe08748e0b1ecf48ea4af35b96fa23ccd0a0c