| Summary: | Underlined characters in titles rendered incorrectly as ampersands in KDE6 | ||
|---|---|---|---|
| Product: | [Frameworks and Libraries] frameworks-ki18n | Reporter: | Tom Crider <gloriouseggroll> |
| Component: | general | Assignee: | Chusslove Illich <caslav.ilic> |
| Status: | REPORTED --- | ||
| Severity: | normal | CC: | adrianinsaval, bugseforuns, funny0facer, jgqehj55, kdebugs, kdelibs-bugs-null, smowtenshi |
| Priority: | NOR | ||
| Version First Reported In: | 6.0.0 | ||
| Target Milestone: | --- | ||
| Platform: | Fedora RPMs | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | ampersands where titles are. | ||
|
Description
Tom Crider
2024-03-07 07:46:42 UTC
Turns out this is a QT bug. Same bug listed here: https://bugreports.qt.io/browse/QTBUG-86407 The same fix from this commit: https://github.com/qt/qtbase/commit/cc67b25579c1bb5ea9f5c1ca4c9b7997e66f19b9 Also needs to be applied to QDockWidget inside qstylesheetstyle. obs-studio uses stylesheets so that clued me in: ``` From 519cfee1bb6c1477a2cc5efdb2c9997904ddcbed Mon Sep 17 00:00:00 2001 From: GloriousEggroll <gloriouseggroll@gmail.com> Date: Thu, 7 Mar 2024 01:28:08 -0700 Subject: [PATCH] fix underlined text in dock widget titles rendering as ampersands --- src/widgets/styles/qstylesheetstyle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp index 1ba8aa7c..37685b5f 100644 --- a/src/widgets/styles/qstylesheetstyle.cpp +++ b/src/widgets/styles/qstylesheetstyle.cpp @@ -4484,7 +4484,7 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q QString titleText = p->fontMetrics().elidedText(dwOpt->title, Qt::ElideRight, r.width()); drawItemText(p, r, - alignment, dwOpt->palette, + alignment | Qt::TextHideMnemonic, dwOpt->palette, dwOpt->state & State_Enabled, titleText, QPalette::WindowText); -- 2.44.0 ``` For additional reference I also noticed when loaded correctly in gnome it does not have underlined characters on the dock widget titles, so this should be the correct behavior for kde as well. *** Bug 483488 has been marked as a duplicate of this bug. *** I'm still seeing this issue in FreeCAD, with qt 6.7.2 which should already include the qt fix. Maybe this fix needs to be applied in breeze too? maybe this would fix this? https://invent.kde.org/plasma/breeze/-/merge_requests/491 |