1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-06 05:25:41 -05:00

no purple grid fallbacks, rely on system icons only

This commit is contained in:
bbedward
2025-08-25 09:23:45 -04:00
parent fb7a019786
commit a0e825c37e
8 changed files with 17 additions and 50 deletions

View File

@@ -390,10 +390,7 @@ DankModal {
id: listIconImg
anchors.fill: parent
source: (model.icon) ? Quickshell.iconPath(
model.icon,
SettingsData.iconTheme === "System Default" ? "" : SettingsData.iconTheme) : ""
smooth: true
source: Quickshell.iconPath(model.icon, true)
asynchronous: true
visible: status === Image.Ready
}
@@ -584,9 +581,7 @@ DankModal {
id: gridIconImg
anchors.fill: parent
source: (model.icon) ? Quickshell.iconPath(
model.icon,
SettingsData.iconTheme === "System Default" ? "" : SettingsData.iconTheme) : ""
source: Quickshell.iconPath(model.icon, true)
smooth: true
asynchronous: true
visible: status === Image.Ready

View File

@@ -421,9 +421,7 @@ DankPopout {
id: listIconImg
anchors.fill: parent
source: (model.icon) ? Quickshell.iconPath(
model.icon,
SettingsData.iconTheme === "System Default" ? "" : SettingsData.iconTheme) : ""
source: Quickshell.iconPath(model.icon, true)
smooth: true
asynchronous: true
visible: status === Image.Ready
@@ -614,9 +612,7 @@ DankPopout {
id: gridIconImg
anchors.fill: parent
source: (model.icon) ? Quickshell.iconPath(
model.icon,
SettingsData.iconTheme === "System Default" ? "" : SettingsData.iconTheme) : ""
source: Quickshell.iconPath(model.icon, true)
smooth: true
asynchronous: true
visible: status === Image.Ready

View File

@@ -277,19 +277,7 @@ Item {
anchors.centerIn: parent
implicitSize: 40
source: {
if (!appData || !appData.appId)
return ""
var desktopEntry = DesktopEntries.byId(appData.appId)
if (desktopEntry && desktopEntry.icon) {
var iconPath = Quickshell.iconPath(
desktopEntry.icon, SettingsData.iconTheme
=== "System Default" ? "" : SettingsData.iconTheme)
return iconPath
}
return ""
}
source: Quickshell.iconPath(DesktopEntries.byId(appData.appId).icon, true)
mipmap: true
smooth: true
asynchronous: true

View File

@@ -162,7 +162,7 @@ Rectangle {
"http://") || appIcon.startsWith(
"https://"))
return appIcon
return Quickshell.iconPath(appIcon, "")
return Quickshell.iconPath(appIcon, true)
}
return ""
}
@@ -458,7 +458,7 @@ Rectangle {
"https://"))
return appIcon
return Quickshell.iconPath(appIcon, "")
return Quickshell.iconPath(appIcon, true)
}
return ""
}

View File

@@ -261,7 +261,7 @@ PanelWindow {
|| appIcon.startsWith("https://"))
return appIcon
return Quickshell.iconPath(appIcon, "")
return Quickshell.iconPath(appIcon, true)
}
return ""
}

View File

@@ -1,5 +1,6 @@
import QtQuick
import QtQuick.Controls
import Quickshell
import Quickshell.Io
import qs.Common
import qs.Modals
@@ -754,7 +755,7 @@ Item {
width: parent.width - Theme.iconSize - Theme.spacingXS
anchors.verticalCenter: parent.verticalCenter
text: "Icon Theme"
description: "DankShell & System Icons"
description: "DankShell & System Icons\n(requires restart)"
currentValue: SettingsData.iconTheme
enableFuzzySearch: true
popupWidthOffset: 100
@@ -765,11 +766,11 @@ Item {
}
onValueChanged: value => {
SettingsData.setIconTheme(value)
if (value !== "System Default"
&& !SettingsData.qt5ctAvailable
&& !SettingsData.qt6ctAvailable)
ToastService.showWarning(
"qt5ct or qt6ct not found - Qt app themes may not update without these tools")
if (Quickshell.env("QT_QPA_PLATFORMTHEME") != "gtk3" &&
Quickshell.env("QT_QPA_PLATFORMTHEME") != "qt6ct" &&
Quickshell.env("QT_QPA_PLATFORMTHEME_QT6") != "qt6ct") {
ToastService.showError("Missing Environment Variables", "You need to set either:\nQT_QPA_PLATFORMTHEME=gtk3 OR\nQT_QPA_PLATFORMTHEME=qt6ct\nas environment variables, and then restart the shell.\n\nqt6ct requires qt6ct-kde to be installed.")
}
}
}
}

View File

@@ -116,20 +116,7 @@ Rectangle {
anchors.verticalCenter: parent.verticalCenter
width: 18
height: 18
source: {
if (!appId)
return ""
var desktopEntry = DesktopEntries.byId(appId)
if (desktopEntry && desktopEntry.icon) {
var iconPath = Quickshell.iconPath(
desktopEntry.icon,
SettingsData.iconTheme
=== "System Default" ? "" : SettingsData.iconTheme)
return iconPath
}
return ""
}
source: Quickshell.iconPath(DesktopEntries.byId(appId).icon, true)
smooth: true
mipmap: true
asynchronous: true

View File

@@ -23,7 +23,7 @@ IconImage {
stdout: StdioCollector {
onStreamFinished: () => {
root.source = Quickshell.iconPath(
this.text.trim())
this.text.trim(), true)
}
}
}