Bug 491546 - If the layoutDirection is set to RightToLeft, the context menu is malformed
Summary: If the layoutDirection is set to RightToLeft, the context menu is malformed
Status: CONFIRMED
Alias: None
Product: Breeze
Classification: Plasma
Component: general (other bugs)
Version First Reported In: git-stable-Plasma/6.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-10 18:36 UTC by Jim Jones
Modified: 2025-06-21 12:57 UTC (History)
2 users (show)

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


Attachments
picture showing the malformed menu (10.99 KB, image/png)
2024-08-10 18:38 UTC, Jim Jones
Details
normal menu with default qt theme (14.48 KB, image/png)
2024-08-10 18:39 UTC, Jim Jones
Details
untar the file, open a shell in the corresponding folder and build with: qmake6 . ; make (391 bytes, application/x-compressed-tar)
2024-10-16 17:53 UTC, Jim Jones
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Jones 2024-08-10 18:36:12 UTC
SUMMARY
if the layoutDirection is set to RightToLeft the context menu is malformed when using the dark breeze theme

STEPS TO REPRODUCE
1. compile example code
2. set dark breeze theme
3. start example app
4. right click in the QDoubleSpinBox

OBSERVED RESULT
the context menu is malformed

EXPECTED RESULT
the context menu is not malformed

SOFTWARE/OS VERSIONS
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Kernel Version: 6.10.3 (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION
example code to reproduce the bug:

int main(int argc, char* argv[])
{
    QApplication app(argc, argv);
    QDoubleSpinBox sb;
    sb.setLayoutDirection(Qt::RightToLeft);
    sb.show();
    return app.exec();
}
Comment 1 Jim Jones 2024-08-10 18:38:06 UTC
Created attachment 172477 [details]
picture showing the malformed menu
Comment 2 Jim Jones 2024-08-10 18:39:24 UTC
Created attachment 172478 [details]
normal menu with default qt theme
Comment 3 Nate Graham 2024-08-12 17:40:52 UTC
Cannot reproduce in an actual app, e.g. Dolphin run with `dolphin --reverse`. Can you?

Also your sample code isn't complete e.g. it's missing includes and stuff.
Comment 4 Jim Jones 2024-08-13 10:01:54 UTC
i can't reproduce it with dolphin but i don't see a QDoubleSpinBox in dolphin.

this code compiles here and shows the bug:

#include <QtWidgets>

int main(int argc, char *argv[])
{
	QApplication app(argc, argv);
	QDoubleSpinBox sb;
	sb.setLayoutDirection(Qt::RightToLeft);
	sb.show();
	return app.exec();
}
Comment 5 Jim Jones 2024-08-13 10:05:17 UTC
and the test.pro file:

TEMPLATE = app
QT += widgets
SOURCES += main.cpp
Comment 6 Jim Jones 2024-10-11 10:26:36 UTC
@Nate Graham: could you reproduce the bug?
Comment 7 Nate Graham 2024-10-16 17:29:34 UTC
Unfortunately I am not smart enough to figure out how to compile an app from those text snippets.
Comment 8 Jim Jones 2024-10-16 17:53:51 UTC
Created attachment 174903 [details]
untar the file, open a shell in the corresponding folder and build with: qmake6 . ; make
Comment 9 Jim Jones 2025-01-11 13:59:09 UTC
could you compile it now?(In reply to Nate Graham from comment #7)
> Unfortunately I am not smart enough to figure out how to compile an app from
> those text snippets.

could you compile it now?
Comment 10 Jim Jones 2025-02-06 14:26:03 UTC
ping
Comment 11 Jim Jones 2025-02-06 14:26:25 UTC
@Nate Graham
Comment 12 Nate Graham 2025-02-10 20:05:27 UTC
Yes, I can reproduce the issue with the example code now, thanks. However I don't see it in any of our actual apps when in reversed mode. Where did you see this happen?
Comment 13 Jim Jones 2025-06-21 10:23:00 UTC
i wrote an app where i used it and the example code shows that there is a bug

will this get fixed?
Comment 14 Nate Graham 2025-06-21 12:57:46 UTC
If someone takes initiative to fix it, yeah.