Skip to content

QMenuProxy & Plasma::Types::PopupPlacement: Reverse direction for RTL

ivan tkachenko requested to merge work/ratijas/rtl-menu into master

Function naming is taken directly from QStyle where visualRect() is used to flip rectangles within components' bounding boxes automatically if needed.

The QQmlProperty trick is taken from some internal Qt test. It relies on assumption that QtQuick module is imported without an alias, which is the case in 99% of pragmatic QML code, with exceptions being Qt tests, Qt3D and JavaScript modules with QML/JS engine extension of importing QML modules. Overall, in ~/kde/src:

Searching 324578 files for "import QtQuick (\d\.\d{1,2} )?as" (regex, case sensitive)
...
114 matches across 109 files

image

Merge request reports