1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

i18n: WIP initial RTL support

- notifications
- color picker
- process list
- settings
- control center, dash
- launcher

part of #1059
This commit is contained in:
bbedward
2025-12-17 13:50:06 -05:00
parent 811e89fcfa
commit 523ccc6bf8
41 changed files with 5735 additions and 730 deletions

View File

@@ -5,6 +5,9 @@ import qs.Widgets
Item {
id: toggle
LayoutMirroring.enabled: I18n.isRtl
LayoutMirroring.childrenInherit: true
// API
property bool checked: false
property bool enabled: true
@@ -27,9 +30,10 @@ Item {
height: showText ? (description.length > 0 ? 60 : 44) : trackHeight
function handleClick() {
if (!enabled) return
clicked()
toggled(!checked)
if (!enabled)
return;
clicked();
toggled(!checked);
}
StyledRect {
@@ -58,6 +62,7 @@ Item {
visible: showText
Column {
width: parent.width
anchors.verticalCenter: parent.verticalCenter
spacing: Theme.spacingXS
@@ -66,6 +71,8 @@ Item {
font.pixelSize: Appearance.fontSize.normal
font.weight: Font.Medium
opacity: toggle.enabled ? 1 : 0.4
width: parent.width
anchors.left: parent.left
}
StyledText {
@@ -75,6 +82,7 @@ Item {
wrapMode: Text.WordWrap
width: Math.min(implicitWidth, toggle.width - 120)
visible: toggle.description.length > 0
anchors.left: parent.left
}
}
}
@@ -121,7 +129,7 @@ Item {
}
ScriptAction {
script: {
toggle.toggleCompleted(toggle.checked)
toggle.toggleCompleted(toggle.checked);
}
}
}