Bug 487387

Summary: Use of unstyled Qt QML font selector dialogs constitutes a visual and usability regression
Product: [Plasma] plasma-integration Reporter: Marco TT <write>
Component: generalAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED UPSTREAM    
Severity: normal CC: akselmo, anditosan1000, andrea.ippo, aronkvh, bg+kdex, bugs.kde, bugseforuns, dan, eamonnrea, eliteamdgaming, erentar2002, justin, kde, mattybigback, med.medin.2014, musicalstrength27, nate, nicolas.fella, pallaswept, postix, sam, spam1, uncognic, yashXkhatri
Priority: HI Keywords: regression, usability
Version First Reported In: 6.0.4   
Target Milestone: ---   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=490861
https://bugs.kde.org/show_bug.cgi?id=492959
Latest Commit: Version Fixed In: Qt 6.8.0
Sentry Crash Report:
Attachments: Screenshot of the font selector

Description Marco TT 2024-05-22 20:52:14 UTC
Created attachment 169716 [details]
Screenshot of the font selector

SUMMARY

When using Breeze dark, the font selector in the digital clock has clear text on clear background, making the items in the list almost invisible

STEPS TO REPRODUCE
1. Set theme to Breeze dark
2. On Digital Clock widget, right click "Configure Digital Clock"
2. Under "Appearance", select the "Manual Option" for the "Text Display" radio
3. Click "Choose Style..." button

OBSERVED RESULT
The list of fonts is in clear color over clear background, making it unreadable

EXPECTED RESULT
The list of fonts is in clear color over dark background

SOFTWARE/OS VERSIONS
Operating System: EndeavourOS 
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.0
Graphics Platform: Wayland
Graphics Processor: NVIDIA GeForce GTX 1060 6GB/PCIe/SSE2
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: B660 DS3H AX DDR4

ADDITIONAL INFORMATION
I am able to replicate the bug on my laptop, with similar versions of KDE.
Comment 1 Nate Graham 2024-05-22 21:08:35 UTC
Yeah, unfortunately this is going to affect almost all the font selectors because we're using the unstyled version that comes from Qt, which doesn't look great or integrate properly with our color scheme stuff. We're using it because the alternative was even worse; see Bug 478155.
Comment 2 Marco TT 2024-05-23 13:54:25 UTC
(In reply to Nate Graham from comment #1)
> Yeah, unfortunately this is going to affect almost all the font selectors
> because we're using the unstyled version that comes from Qt, which doesn't
> look great or integrate properly with our color scheme stuff. We're using it
> because the alternative was even worse; see Bug 478155.

Ah, thanks for the quick reply. 

Should a bug be logged to QT? I took a cursory look at their bug tracker and at a glance I don't see any ticket on QFontDialog becoming unresponsive - but I'm not a developer so it may be worded differently.
Comment 3 Nate Graham 2024-05-23 15:03:52 UTC
I think it's not really a Qt bug per se; more like an incompatibility between their upstream method of doing UI coloration, and what we do in KDE; we overlay a bunch of stuff on top of it, and the Qt code isn't aware of that.

If anything the bug is on us for our implementation of QFontDialog styling suffering from the bug that causes us to revert to upstream styling.
Comment 4 medin 2024-05-25 13:45:46 UTC
(In reply to Nate Graham from comment #3)
> I think it's not really a Qt bug per se; more like an incompatibility
> between their upstream method of doing UI coloration, and what we do in KDE;
> we overlay a bunch of stuff on top of it, and the Qt code isn't aware of
> that.
> 
> If anything the bug is on us for our implementation of QFontDialog styling
> suffering from the bug that causes us to revert to upstream styling.

Those new popups are making many things inconsistent inside Plasma, why not simply use the normal font dialog?
it's the same problem with that broken color chooser new popup.
Comment 5 Nate Graham 2024-06-12 14:04:53 UTC
In Qt 6, this *is* "the normal font dialog". That's the problem.
Comment 6 Nate Graham 2024-06-20 23:06:22 UTC
*** Bug 488822 has been marked as a duplicate of this bug. ***
Comment 7 Nate Graham 2024-06-25 14:05:13 UTC
*** Bug 489176 has been marked as a duplicate of this bug. ***
Comment 8 Nate Graham 2024-08-19 23:00:54 UTC
*** Bug 491836 has been marked as a duplicate of this bug. ***
Comment 9 Nate Graham 2024-08-19 23:01:55 UTC
*** Bug 490381 has been marked as a duplicate of this bug. ***
Comment 10 Akseli Lahtinen 2024-08-21 13:08:46 UTC
*** Bug 491986 has been marked as a duplicate of this bug. ***
Comment 11 Andres Betts 2024-08-25 15:04:58 UTC
I can confirm that it also has issues with scrolling speed. It's much slower than anywhere else in the system.
Comment 12 Akseli Lahtinen 2024-08-30 12:24:42 UTC
*** Bug 492376 has been marked as a duplicate of this bug. ***
Comment 13 cwo 2024-09-18 16:18:34 UTC
*** Bug 486367 has been marked as a duplicate of this bug. ***
Comment 14 Andrea Ippolito 2024-09-25 07:09:51 UTC
Oh I'm not alone, then

Came here to report it this morning, glad to see it's already there.

What I didn't understand by reading the comments though, is how come the System Settings font selector isn't affected by this. Is it a different component?
Comment 15 Kai Uwe Broulik 2024-09-25 11:43:29 UTC
https://codereview.qt-project.org/c/qt/qtdeclarative/+/593610 This fixes the dialog colors in dark mode
Comment 16 Nate Graham 2024-09-25 18:59:43 UTC
Thanks a ton, Kai! Ultimately any further improvements here will have to go through Qt since it's their dialog, and there appear to be no viable efforts to replace them with custom ones in KDE.
Comment 17 Patrick Silva 2024-11-05 10:48:48 UTC
This bug persists on neon unstable running Qt 6.8.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 6.2.80
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0
Graphics Platform: Wayland
Comment 18 Nate Graham 2024-11-05 18:03:48 UTC
Can reproduce that; the colors are still broken with a dark color scheme. It remains an upstream issue, unfortunately.
Comment 19 Paul Worrall 2024-11-07 09:54:50 UTC
*** Bug 495898 has been marked as a duplicate of this bug. ***
Comment 20 Filip 2024-12-06 12:03:00 UTC
*** Bug 496969 has been marked as a duplicate of this bug. ***
Comment 21 Sam Birch 2024-12-26 15:59:01 UTC
*** Bug 494638 has been marked as a duplicate of this bug. ***
Comment 22 Justin Zobel 2025-02-19 02:22:28 UTC
I just came across this and I think it might be an issue with the Applet and how it raises font selection.

On my current Plasma 6.2.5 desktop I get the correctly breeze styled font selection box when going into System Settings > Fonts trying to choose a font for 'General' text. If I try to change the font in the Digital Clock applet I get the bad dialog (screenshot: https://i.imgur.com/c7vrl7f.png)
Comment 23 Bug Janitor Service 2025-03-04 23:26:02 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5289
Comment 24 Fushan Wen 2025-03-07 15:09:54 UTC
Git commit aaae7d2910c4d9641ba61d64a6fb843908c4351d by Fushan Wen, on behalf of Nate Graham.
Committed on 07/03/2025 at 15:07.
Pushed by ngraham into branch 'master'.

applets/digital-clock: use better-looking Qt.Labs version of FontDialog

Right now we get the QML version of this dialog introduced with Qt 6.
Unfortunately it looks ugly and broken. Until Qt improves the dialog
or we override it with our own in plasma-integration, let's use the
version provided by Qt.Labs, which is the one we had for Plasma 5.

M  +9    -4    applets/digital-clock/package/contents/ui/configAppearance.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/aaae7d2910c4d9641ba61d64a6fb843908c4351d
Comment 25 Bug Janitor Service 2025-03-07 15:11:08 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5297
Comment 26 Nate Graham 2025-03-07 16:57:45 UTC
Git commit 78a0ff3845f580a3deb2d4afa109a49a18344325 by Nate Graham.
Committed on 07/03/2025 at 15:10.
Pushed by ngraham into branch 'Plasma/6.3'.

applets/digital-clock: use better-looking Qt.Labs version of FontDialog

Right now we get the QML version of this dialog introduced with Qt 6.
Unfortunately it looks ugly and broken. Until Qt improves the dialog
or we override it with our own in plasma-integration, let's use the
version provided by Qt.Labs, which is the one we had for Plasma 5.


(cherry picked from commit aaae7d2910c4d9641ba61d64a6fb843908c4351d)

Co-authored-by: Nate Graham <nate@kde.org>

M  +9    -4    applets/digital-clock/package/contents/ui/configAppearance.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/78a0ff3845f580a3deb2d4afa109a49a18344325