Bug 476364 - Incorrectly styled font selector
Summary: Incorrectly styled font selector
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Digital Clock widget (show other bugs)
Version: master
Platform: Neon Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2023-10-31 11:53 UTC by Patrick Silva
Modified: 2024-06-15 22:22 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
screenshot (97.93 KB, image/png)
2023-10-31 11:53 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2023-10-31 11:53:17 UTC
Created attachment 162761 [details]
screenshot

STEPS TO REPRODUCE
1. open Digital Clock settings
2. set "Text display" to "Manual"
3. click on "Choose style..." button

OBSERVED RESULT
Incorrectly styled font selector seen in the attached screenshot

EXPECTED RESULT
Correctly styled font selector

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.27.80
KDE Frameworks Version: 5.240.0
Qt Version: 6.6.0
Graphics Platform: Wayland
Comment 1 Nate Graham 2023-11-01 20:47:15 UTC
Can reproduce. It's quite horrible now. We must be doing something wrong in the Digital Clock code, as it works correctly in the Fonts KCM.
Comment 2 Nicolas Fella 2023-11-01 20:51:24 UTC
(In reply to Nate Graham from comment #1)
> Can reproduce. It's quite horrible now. We must be doing something wrong in
> the Digital Clock code, as it works correctly in the Fonts KCM.

Nothing wrong per se. The difference is that the clock code uses the QML font dialog, which has this horrible default implementation. The KCM uses KFontChooserDialog, which is widgets-based
Comment 3 Nate Graham 2023-11-01 21:00:07 UTC
Ah right, and in Qt 6, the QML one no longer falls back to the Widgets one, right?

Do we need to style it ourselves in plasma-integration or something?
Comment 4 Bug Janitor Service 2023-11-01 23:04:19 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-integration/-/merge_requests/115
Comment 5 Nicolas Fella 2023-11-04 22:20:53 UTC
Git commit 53cfae46b00f7844718bb75c469cfcf6efcb070d by Nicolas Fella.
Committed on 04/11/2023 at 23:19.
Pushed by nicolasfella into branch 'master'.

Implement Font dialogs

QML FontDialog first queries the platform theme for an implementation. Since we don't provide one
we get the default one, which is less than stellar.

In Qt5 we would get a widgets-based one that works fine.

We can get the Qt5 behavior back by asking for a QFontDialog (and passing DontUseNativeDialog to avoid endless recursion)

M  +1    -0    qt6/autotests/CMakeLists.txt
M  +1    -0    qt6/src/platformtheme/CMakeLists.txt
A  +64   -0    qt6/src/platformtheme/kdeplatformfontdialoghelper.cpp     [License: LGPL(3+eV) LGPL(v3.0) LGPL(v2.0)]
A  +32   -0    qt6/src/platformtheme/kdeplatformfontdialoghelper.h     [License: LGPL(3+eV) LGPL(v3.0) LGPL(v2.0)]
M  +3    -1    qt6/src/platformtheme/kdeplatformtheme.cpp

https://invent.kde.org/plasma/plasma-integration/-/commit/53cfae46b00f7844718bb75c469cfcf6efcb070d