Bug 503255 - OSD never reverses with RTL language or --reverse parameter
Summary: OSD never reverses with RTL language or --reverse parameter
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 6.3.0
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: rtl
Depends on:
Blocks:
 
Reported: 2025-04-23 21:50 UTC by easy_lad
Modified: 2025-05-14 01:46 UTC (History)
4 users (show)

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


Attachments
It is displayed in LTR, not in RTL (15.03 KB, image/png)
2025-04-23 21:50 UTC, easy_lad
Details
another example, but with brightness (5.37 KB, image/png)
2025-04-23 21:52 UTC, easy_lad
Details

Note You need to log in before you can comment on or make changes to this bug.
Description easy_lad 2025-04-23 21:50:45 UTC
Created attachment 180590 [details]
It is displayed in LTR, not in RTL

SUMMARY

Overlay when scroll on hover over icon for RTL languages, it is in wrong direction (LTR), image attached is for sound volume which even the slider follows LTR way, but is also issue with screen brightness etc and their logo placement too for example the language, keyboard icon should be on the right.

STEPS TO REPRODUCE
1. hover over icon
2. scroll mouse wheel
3. see the overlay that shows up

OBSERVED RESULT

It is in LTR

EXPECTED RESULT

displayed in RTL

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora Linux 41
KDE Plasma Version: 6.3.3
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.2
Comment 1 easy_lad 2025-04-23 21:52:32 UTC
Created attachment 180591 [details]
another example, but with brightness
Comment 2 Nate Graham 2025-04-24 08:35:44 UTC
Can reproduce with `LANGUAGE=ar_AR plasmashell --replace`
Comment 3 Nate Graham 2025-05-08 21:08:20 UTC
It looks like this is a generic issue affecting PlasmaCore.Dialog. Woatever you give it as a its mainItem, that thing won't respect layout mirroring, even if I manually set

LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft
LayoutMirroring.childrenInherit: true

I can see the same issue with Task Manager tooltips, which have complex layouts inside a PlasmaCore.Dialog.

Moving to libplasma.
Comment 4 Marco Martin 2025-05-09 12:31:49 UTC
Do we know if PlasmaWindow/PopupPlasmaWindow (which are the intended replacements for Dialog) also have this problem?
Comment 5 Oliver Beard 2025-05-09 15:23:08 UTC
The reason why fixes did not previously affect the OSD was because they were applied to the fallback rather than the actual, which have now been unified in plasma-workspace.

I've opened an MR to introduce LayoutMirroring to the OSD therefore, to effectively resolve the problem for now, deferring any internal changes we want to make:

It may not be appropriate for org.kde.plasma.core's Dialog to automatically apply LayoutMirroring itself, as it appears to generally not be intended for use as a root QML item. This would not be the case for PlasmaWindow/PopupPlasmaWindow which the OSD should probably use instead.
Comment 6 Oliver Beard 2025-05-11 20:23:05 UTC
Git commit 8845c001e2de0ef1c97daf2bf7f2ca1e4efd1f34 by Oliver Beard.
Committed on 11/05/2025 at 20:07.
Pushed by olib into branch 'master'.

shell/Osd: Fix missing RTL
PlasmaCore.Dialog does not set LayoutMirroring for us, so we need to do it ourselves.

M  +3    -0    shell/qml/Osd.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/8845c001e2de0ef1c97daf2bf7f2ca1e4efd1f34