Skip to content
Verified Commit cbc5d3d6 authored by ivan tkachenko's avatar ivan tkachenko 🗯
Browse files

PC3: Support RTL layouts in controls

Main change here is in PC3/private/IconLabel: Flattening one layer of
Items and unmirroring its left/right padding.

Padding sizes are not mirrored in QtQuick.Controls, so as unfortunate as
it is we better be consistent with stdlib rather than reinventing them
on Plasma's side.

Since this IconLabel component is a plain Item and not a T.Control, it
doesn't have the `mirrored` shortcut property exposed (even though it
has it in C++ internals, which is how and why LayoutMirroring magic
actually works). So we redefine the property with a sane default
expression, and then forward the value from controls than use it if
appropriate.

All controls that use IconLabel are now fully functional in RTL too:
 - PC3.CheckBox,
 - PC3.CheckDelegate,
 - PC3.ItemDelegate,
 - PC3.RadioButton,
 - PC3.RadioDelegate,
 - PC3.Switch,
 - PC3.SwitchDelegate,
 - and PC3.TabButton.

Theirs and their indicators' positioning is synced to a default QQC2
implementation except it also takes an icon into account.

While at it, this patch bumps some QML imports and strips some unused
ones.
parent 861141de
Pipeline #223162 passed with stage
in 2 minutes and 40 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment