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

View File

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

View File

@@ -277,19 +277,7 @@ Item {
anchors.centerIn: parent anchors.centerIn: parent
implicitSize: 40 implicitSize: 40
source: { source: Quickshell.iconPath(DesktopEntries.byId(appData.appId).icon, true)
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 ""
}
mipmap: true mipmap: true
smooth: true smooth: true
asynchronous: true asynchronous: true

View File

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

View File

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

View File

@@ -1,5 +1,6 @@
import QtQuick import QtQuick
import QtQuick.Controls import QtQuick.Controls
import Quickshell
import Quickshell.Io import Quickshell.Io
import qs.Common import qs.Common
import qs.Modals import qs.Modals
@@ -754,7 +755,7 @@ Item {
width: parent.width - Theme.iconSize - Theme.spacingXS width: parent.width - Theme.iconSize - Theme.spacingXS
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: "Icon Theme" text: "Icon Theme"
description: "DankShell & System Icons" description: "DankShell & System Icons\n(requires restart)"
currentValue: SettingsData.iconTheme currentValue: SettingsData.iconTheme
enableFuzzySearch: true enableFuzzySearch: true
popupWidthOffset: 100 popupWidthOffset: 100
@@ -765,11 +766,11 @@ Item {
} }
onValueChanged: value => { onValueChanged: value => {
SettingsData.setIconTheme(value) SettingsData.setIconTheme(value)
if (value !== "System Default" if (Quickshell.env("QT_QPA_PLATFORMTHEME") != "gtk3" &&
&& !SettingsData.qt5ctAvailable Quickshell.env("QT_QPA_PLATFORMTHEME") != "qt6ct" &&
&& !SettingsData.qt6ctAvailable) Quickshell.env("QT_QPA_PLATFORMTHEME_QT6") != "qt6ct") {
ToastService.showWarning( 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.")
"qt5ct or qt6ct not found - Qt app themes may not update without these tools") }
} }
} }
} }

View File

@@ -116,20 +116,7 @@ Rectangle {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
width: 18 width: 18
height: 18 height: 18
source: { source: Quickshell.iconPath(DesktopEntries.byId(appId).icon, true)
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 ""
}
smooth: true smooth: true
mipmap: true mipmap: true
asynchronous: true asynchronous: true

View File

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