1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-14 09:42:10 -04: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

@@ -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;
}