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

@@ -128,6 +128,9 @@ DankModal {
FocusScope {
id: colorContent
LayoutMirroring.enabled: I18n.isRtl
LayoutMirroring.childrenInherit: true
property alias hexInput: hexInput
anchors.fill: parent
@@ -160,12 +163,14 @@ DankModal {
font.pixelSize: Theme.fontSizeLarge
color: Theme.surfaceText
font.weight: Font.Medium
anchors.left: parent.left
}
StyledText {
text: I18n.tr("Select a color from the palette or use custom sliders")
font.pixelSize: Theme.fontSizeMedium
color: Theme.surfaceTextMedium
anchors.left: parent.left
}
}
@@ -360,6 +365,7 @@ DankModal {
font.pixelSize: Theme.fontSizeMedium
color: Theme.surfaceText
font.weight: Font.Medium
anchors.left: parent.left
}
GridView {
@@ -410,6 +416,7 @@ DankModal {
font.pixelSize: Theme.fontSizeMedium
color: Theme.surfaceText
font.weight: Font.Medium
anchors.left: parent.left
}
Row {
@@ -462,6 +469,7 @@ DankModal {
font.pixelSize: Theme.fontSizeMedium
color: Theme.surfaceText
font.weight: Font.Medium
anchors.left: parent.left
}
DankSlider {
@@ -507,6 +515,7 @@ DankModal {
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceTextMedium
font.weight: Font.Medium
anchors.left: parent.left
}
Row {
@@ -566,6 +575,7 @@ DankModal {
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceTextMedium
font.weight: Font.Medium
anchors.left: parent.left
}
Row {
@@ -630,6 +640,7 @@ DankModal {
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceTextMedium
font.weight: Font.Medium
anchors.left: parent.left
}
Row {

View File

@@ -99,7 +99,7 @@ DankModal {
}
function toggleDoNotDisturb(): string {
SessionData.setDoNotDisturb(!SessionData.doNotDisturb)
SessionData.setDoNotDisturb(!SessionData.doNotDisturb);
return "NOTIFICATION_MODAL_TOGGLE_DND_SUCCESS";
}
@@ -111,6 +111,9 @@ DankModal {
Item {
id: notificationKeyHandler
LayoutMirroring.enabled: I18n.isRtl
LayoutMirroring.childrenInherit: true
anchors.fill: parent
Column {

View File

@@ -108,6 +108,9 @@ FloatingWindow {
FocusScope {
id: contentFocusScope
LayoutMirroring.enabled: I18n.isRtl
LayoutMirroring.childrenInherit: true
anchors.fill: parent
focus: true

View File

@@ -5,6 +5,9 @@ import qs.Modules.Settings
FocusScope {
id: root
LayoutMirroring.enabled: I18n.isRtl
LayoutMirroring.childrenInherit: true
property int currentIndex: 0
property var parentModal: null

View File

@@ -135,6 +135,9 @@ FloatingWindow {
FocusScope {
id: contentFocusScope
LayoutMirroring.enabled: I18n.isRtl
LayoutMirroring.childrenInherit: true
anchors.fill: parent
focus: true
@@ -223,7 +226,7 @@ FloatingWindow {
SettingsSidebar {
id: sidebar
x: 0
anchors.left: parent.left
width: settingsModal.isCompactMode ? parent.width : 270
visible: settingsModal.isCompactMode ? settingsModal.menuVisible : true
parentModal: settingsModal
@@ -238,8 +241,8 @@ FloatingWindow {
}
Item {
x: settingsModal.isCompactMode ? (settingsModal.menuVisible ? parent.width : 0) : sidebar.width
width: settingsModal.isCompactMode ? parent.width : parent.width - sidebar.width
anchors.left: settingsModal.isCompactMode ? (settingsModal.menuVisible ? sidebar.right : parent.left) : sidebar.right
anchors.right: parent.right
height: parent.height
clip: true
@@ -250,14 +253,6 @@ FloatingWindow {
parentModal: settingsModal
currentIndex: settingsModal.currentTabIndex
}
Behavior on x {
enabled: settingsModal.enableAnimations
NumberAnimation {
duration: Theme.mediumDuration
easing.bezierCurve: Theme.expressiveCurves.emphasizedDecel
}
}
}
}
}

View File

@@ -9,6 +9,9 @@ import qs.Widgets
Rectangle {
id: root
LayoutMirroring.enabled: I18n.isRtl
LayoutMirroring.childrenInherit: true
property int currentIndex: 0
property var parentModal: null
property var expandedCategories: ({})

View File

@@ -8,6 +8,9 @@ import qs.Widgets
Item {
id: spotlightKeyHandler
LayoutMirroring.enabled: I18n.isRtl
LayoutMirroring.childrenInherit: true
property alias appLauncher: appLauncher
property alias searchField: searchField
property alias fileSearchController: fileSearchController
@@ -72,10 +75,10 @@ Item {
}
event.accepted = true;
} else if (event.key === Qt.Key_Right && searchMode === "apps" && appLauncher.viewMode === "grid") {
appLauncher.selectNextInRow();
I18n.isRtl ? appLauncher.selectPreviousInRow() : appLauncher.selectNextInRow();
event.accepted = true;
} else if (event.key === Qt.Key_Left && searchMode === "apps" && appLauncher.viewMode === "grid") {
appLauncher.selectPreviousInRow();
I18n.isRtl ? appLauncher.selectNextInRow() : appLauncher.selectPreviousInRow();
event.accepted = true;
} else if (event.key == Qt.Key_J && event.modifiers & Qt.ControlModifier) {
if (searchMode === "apps") {
@@ -92,10 +95,10 @@ Item {
}
event.accepted = true;
} else if (event.key == Qt.Key_L && event.modifiers & Qt.ControlModifier && searchMode === "apps" && appLauncher.viewMode === "grid") {
appLauncher.selectNextInRow();
I18n.isRtl ? appLauncher.selectPreviousInRow() : appLauncher.selectNextInRow();
event.accepted = true;
} else if (event.key == Qt.Key_H && event.modifiers & Qt.ControlModifier && searchMode === "apps" && appLauncher.viewMode === "grid") {
appLauncher.selectPreviousInRow();
I18n.isRtl ? appLauncher.selectNextInRow() : appLauncher.selectPreviousInRow();
event.accepted = true;
} else if (event.key === Qt.Key_Tab) {
if (searchMode === "apps") {