mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-27 06:52:50 -05:00
Add FocusedApp compact mode and fix SystemTray to use IconImage
This commit is contained in:
@@ -593,6 +593,8 @@ Item {
|
||||
SettingsData.setClockCompactMode(value)
|
||||
} else if (widgetId === "music") {
|
||||
SettingsData.setMediaSize(value)
|
||||
} else if (widgetId === "focusedWindow") {
|
||||
SettingsData.setFocusedWindowCompactMode(value)
|
||||
}
|
||||
}
|
||||
onGpuSelectionChanged: (sectionId, widgetIndex, selectedIndex) => {
|
||||
@@ -636,6 +638,8 @@ Item {
|
||||
SettingsData.setClockCompactMode(value)
|
||||
} else if (widgetId === "music") {
|
||||
SettingsData.setMediaSize(value)
|
||||
} else if (widgetId === "focusedWindow") {
|
||||
SettingsData.setFocusedWindowCompactMode(value)
|
||||
}
|
||||
}
|
||||
onGpuSelectionChanged: (sectionId, widgetIndex, selectedIndex) => {
|
||||
@@ -679,6 +683,8 @@ Item {
|
||||
SettingsData.setClockCompactMode(value)
|
||||
} else if (widgetId === "music") {
|
||||
SettingsData.setMediaSize(value)
|
||||
} else if (widgetId === "focusedWindow") {
|
||||
SettingsData.setFocusedWindowCompactMode(value)
|
||||
}
|
||||
}
|
||||
onGpuSelectionChanged: (sectionId, widgetIndex, selectedIndex) => {
|
||||
|
||||
@@ -238,7 +238,7 @@ Column {
|
||||
|
||||
Row {
|
||||
spacing: Theme.spacingXS
|
||||
visible: modelData.id === "clock" || modelData.id === "music"
|
||||
visible: modelData.id === "clock" || modelData.id === "music" || modelData.id === "focusedWindow"
|
||||
|
||||
DankActionButton {
|
||||
id: smallSizeButton
|
||||
@@ -279,12 +279,24 @@ Column {
|
||||
DankActionButton {
|
||||
id: compactModeButton
|
||||
buttonSize: 28
|
||||
visible: modelData.id === "clock"
|
||||
iconName: SettingsData.clockCompactMode ? "zoom_out" : "zoom_in"
|
||||
visible: modelData.id === "clock" || modelData.id === "focusedWindow"
|
||||
iconName: {
|
||||
if (modelData.id === "clock") return SettingsData.clockCompactMode ? "zoom_out" : "zoom_in"
|
||||
if (modelData.id === "focusedWindow") return SettingsData.focusedWindowCompactMode ? "zoom_out" : "zoom_in"
|
||||
return "zoom_in"
|
||||
}
|
||||
iconSize: 16
|
||||
iconColor: SettingsData.clockCompactMode ? Theme.primary : Theme.outline
|
||||
iconColor: {
|
||||
if (modelData.id === "clock") return SettingsData.clockCompactMode ? Theme.primary : Theme.outline
|
||||
if (modelData.id === "focusedWindow") return SettingsData.focusedWindowCompactMode ? Theme.primary : Theme.outline
|
||||
return Theme.outline
|
||||
}
|
||||
onClicked: {
|
||||
root.compactModeChanged("clock", !SettingsData.clockCompactMode)
|
||||
if (modelData.id === "clock") {
|
||||
root.compactModeChanged("clock", !SettingsData.clockCompactMode)
|
||||
} else if (modelData.id === "focusedWindow") {
|
||||
root.compactModeChanged("focusedWindow", !SettingsData.focusedWindowCompactMode)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user