1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-27 15:02:50 -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

@@ -166,6 +166,9 @@ DankPopout {
Rectangle {
id: mainContainer
LayoutMirroring.enabled: I18n.isRtl
LayoutMirroring.childrenInherit: true
implicitHeight: contentColumn.height + Theme.spacingM * 2
color: "transparent"
radius: Theme.cornerRadius

View File

@@ -8,6 +8,9 @@ import qs.Widgets
Item {
id: root
LayoutMirroring.enabled: I18n.isRtl
LayoutMirroring.childrenInherit: true
property int dropdownType: 0
property var activePlayer: null
property var allPlayers: []

View File

@@ -10,6 +10,9 @@ import qs.Widgets
Item {
id: root
LayoutMirroring.enabled: I18n.isRtl
LayoutMirroring.childrenInherit: true
property MprisPlayer activePlayer: MprisController.activePlayer
property var allPlayers: MprisController.availablePlayers
property var targetScreen: null

View File

@@ -1,10 +1,12 @@
import QtQuick
import QtQuick.Controls
import qs.Common
Rectangle {
id: card
LayoutMirroring.enabled: I18n.isRtl
LayoutMirroring.childrenInherit: true
property int pad: Theme.spacingM
radius: Theme.cornerRadius

View File

@@ -1,20 +1,19 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import qs.Common
import qs.Services
import qs.Widgets
import qs.Modules.DankDash.Overview
Item {
id: root
LayoutMirroring.enabled: I18n.isRtl
LayoutMirroring.childrenInherit: true
implicitWidth: 700
implicitHeight: 410
signal switchToWeatherTab()
signal switchToMediaTab()
signal closeDash()
signal switchToWeatherTab
signal switchToMediaTab
signal closeDash
Item {
anchors.fill: parent

View File

@@ -3,7 +3,6 @@ import QtCore
import QtQuick
import QtQuick.Controls
import QtQuick.Effects
import Quickshell
import qs.Common
import qs.Modals.FileBrowser
import qs.Widgets
@@ -11,6 +10,9 @@ import qs.Widgets
Item {
id: root
LayoutMirroring.enabled: I18n.isRtl
LayoutMirroring.childrenInherit: true
implicitWidth: 700
implicitHeight: 410
@@ -95,22 +97,41 @@ Item {
}
if (event.key === Qt.Key_Right || event.key === Qt.Key_L) {
if (gridIndex + 1 < visibleCount) {
gridIndex++;
} else if (currentPage < totalPages - 1) {
gridIndex = 0;
currentPage++;
if (I18n.isRtl) {
if (gridIndex > 0) {
gridIndex--;
} else if (currentPage > 0) {
currentPage--;
const prevPageCount = Math.min(itemsPerPage, wallpaperFolderModel.count - currentPage * itemsPerPage);
gridIndex = prevPageCount - 1;
}
} else {
if (gridIndex + 1 < visibleCount) {
gridIndex++;
} else if (currentPage < totalPages - 1) {
gridIndex = 0;
currentPage++;
}
}
return true;
}
if (event.key === Qt.Key_Left || event.key === Qt.Key_H) {
if (gridIndex > 0) {
gridIndex--;
} else if (currentPage > 0) {
currentPage--;
const prevPageCount = Math.min(itemsPerPage, wallpaperFolderModel.count - currentPage * itemsPerPage);
gridIndex = prevPageCount - 1;
if (I18n.isRtl) {
if (gridIndex + 1 < visibleCount) {
gridIndex++;
} else if (currentPage < totalPages - 1) {
gridIndex = 0;
currentPage++;
}
} else {
if (gridIndex > 0) {
gridIndex--;
} else if (currentPage > 0) {
currentPage--;
const prevPageCount = Math.min(itemsPerPage, wallpaperFolderModel.count - currentPage * itemsPerPage);
gridIndex = prevPageCount - 1;
}
}
return true;
}

View File

@@ -9,6 +9,9 @@ import qs.Modules.DankBar.Widgets
Item {
id: root
LayoutMirroring.enabled: I18n.isRtl
LayoutMirroring.childrenInherit: true
implicitWidth: 700
implicitHeight: 410
property bool syncing: false
@@ -145,6 +148,10 @@ Item {
Item {
id: weatherContainer
LayoutMirroring.enabled: false
LayoutMirroring.childrenInherit: true
width: parent.width
height: weatherColumn.height