1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-06 21:48:30 -04:00

fix(ui): resolve ui inconsistencies and missing i18n strings (#2719)

* Update WorkspacesTab.qml

* Update SettingsButtonGroupRow.qml

* Update WallpaperTab.qml

* Update WidgetsTabSection.qml

* add missing tooltips

* Update WallpaperTab.qml

* Update WorkspacesTab.qml
This commit is contained in:
Youseffo13
2026-07-02 17:27:15 +02:00
committed by GitHub
parent 4ae8ef927c
commit 83b9cdcb27
6 changed files with 327 additions and 63 deletions
+90 -35
View File
@@ -302,54 +302,109 @@ Item {
Item {
width: parent.width
height: fillModeGroup.height
height: fillModeColumn.height
visible: root.currentWallpaper !== "" && !root.currentWallpaper.startsWith("#")
DankButtonGroup {
id: fillModeGroup
property var internalModes: ["Stretch", "Fit", "Fill", "Scrolling", "Tile", "TileVertically", "TileHorizontally", "Pad"]
Column {
id: fillModeColumn
anchors.horizontalCenter: parent.horizontalCenter
model: [I18n.tr("Stretch", "wallpaper fill mode"), I18n.tr("Fit", "wallpaper fill mode"), I18n.tr("Fill", "wallpaper fill mode"), I18n.tr("Scroll", "wallpaper fill mode"), I18n.tr("Tile", "wallpaper fill mode"), I18n.tr("Tile V", "wallpaper fill mode"), I18n.tr("Tile H", "wallpaper fill mode"), I18n.tr("Pad", "wallpaper fill mode")]
selectionMode: "single"
buttonHeight: 28
minButtonWidth: 48
buttonPadding: Theme.spacingS
checkIconSize: 0
textSize: Theme.fontSizeSmall
checkEnabled: false
currentIndex: {
var mode = SessionData.perMonitorWallpaper ? SessionData.getMonitorWallpaperFillMode(selectedMonitorName) : SettingsData.wallpaperFillMode;
return internalModes.indexOf(mode);
spacing: Theme.spacingS
property var firstRowModes: ["Stretch", "Fit", "Fill", "Scrolling"]
property var secondRowModes: ["Tile", "TileVertically", "TileHorizontally", "Pad"]
function currentMode() {
return SessionData.perMonitorWallpaper ? SessionData.getMonitorWallpaperFillMode(selectedMonitorName) : SettingsData.wallpaperFillMode;
}
onSelectionChanged: (index, selected) => {
if (!selected)
return;
function selectMode(mode) {
if (SessionData.perMonitorWallpaper) {
SessionData.setMonitorWallpaperFillMode(selectedMonitorName, internalModes[index]);
SessionData.setMonitorWallpaperFillMode(selectedMonitorName, mode);
} else {
SettingsData.set("wallpaperFillMode", internalModes[index]);
SettingsData.set("wallpaperFillMode", mode);
}
}
Connections {
target: SettingsData
function onWallpaperFillModeChanged() {
if (SessionData.perMonitorWallpaper)
DankButtonGroup {
id: fillModeGroupFirstRow
property var internalModes: fillModeColumn.firstRowModes
anchors.horizontalCenter: parent.horizontalCenter
model: [I18n.tr("Stretch", "wallpaper fill mode"), I18n.tr("Fit", "wallpaper fill mode"), I18n.tr("Fill", "wallpaper fill mode"), I18n.tr("Scroll", "wallpaper fill mode")]
selectionMode: "single"
buttonHeight: 28
minButtonWidth: 48
buttonPadding: Theme.spacingS
checkIconSize: 0
textSize: Theme.fontSizeSmall
checkEnabled: false
currentIndex: {
var mode = fillModeColumn.currentMode();
var idx = internalModes.indexOf(mode);
return idx >= 0 ? idx : -1;
}
onSelectionChanged: (index, selected) => {
if (!selected)
return;
fillModeGroup.currentIndex = fillModeGroup.internalModes.indexOf(SettingsData.wallpaperFillMode);
fillModeColumn.selectMode(internalModes[index]);
}
}
Connections {
target: root
function onSelectedMonitorNameChanged() {
if (!SessionData.perMonitorWallpaper)
return;
fillModeGroup.currentIndex = Qt.binding(() => {
var mode = SessionData.perMonitorWallpaper ? SessionData.getMonitorWallpaperFillMode(selectedMonitorName) : SettingsData.wallpaperFillMode;
return fillModeGroup.internalModes.indexOf(mode);
});
DankButtonGroup {
id: fillModeGroupSecondRow
property var internalModes: fillModeColumn.secondRowModes
anchors.horizontalCenter: parent.horizontalCenter
model: [I18n.tr("Tile", "wallpaper fill mode"), I18n.tr("Tile V", "wallpaper fill mode"), I18n.tr("Tile H", "wallpaper fill mode"), I18n.tr("Pad", "wallpaper fill mode")]
selectionMode: "single"
buttonHeight: 28
minButtonWidth: 48
buttonPadding: Theme.spacingS
checkIconSize: 0
textSize: Theme.fontSizeSmall
checkEnabled: false
currentIndex: {
var mode = fillModeColumn.currentMode();
var idx = internalModes.indexOf(mode);
return idx >= 0 ? idx : -1;
}
onSelectionChanged: (index, selected) => {
if (!selected)
return;
fillModeColumn.selectMode(internalModes[index]);
}
}
}
Connections {
target: SettingsData
function onWallpaperFillModeChanged() {
if (SessionData.perMonitorWallpaper)
return;
fillModeGroupFirstRow.currentIndex = Qt.binding(() => {
var idx = fillModeGroupFirstRow.internalModes.indexOf(SettingsData.wallpaperFillMode);
return idx >= 0 ? idx : -1;
});
fillModeGroupSecondRow.currentIndex = Qt.binding(() => {
var idx = fillModeGroupSecondRow.internalModes.indexOf(SettingsData.wallpaperFillMode);
return idx >= 0 ? idx : -1;
});
}
}
Connections {
target: root
function onSelectedMonitorNameChanged() {
if (!SessionData.perMonitorWallpaper)
return;
fillModeGroupFirstRow.currentIndex = Qt.binding(() => {
var mode = SessionData.getMonitorWallpaperFillMode(selectedMonitorName);
var idx = fillModeGroupFirstRow.internalModes.indexOf(mode);
return idx >= 0 ? idx : -1;
});
fillModeGroupSecondRow.currentIndex = Qt.binding(() => {
var mode = SessionData.getMonitorWallpaperFillMode(selectedMonitorName);
var idx = fillModeGroupSecondRow.internalModes.indexOf(mode);
return idx >= 0 ? idx : -1;
});
}
}
}
@@ -373,7 +428,7 @@ Item {
},
{
"value": "primary",
"label": I18n.tr("Primary Theme Color")
"label": I18n.tr("Primary")
},
{
"value": "surface",