forked from Shinonome/dots-hyprland
add nicer fallback for missing icons
This commit is contained in:
@@ -189,7 +189,7 @@ Item {
|
|||||||
return winArea > maxArea ? win : maxWin
|
return winArea > maxArea ? win : maxWin
|
||||||
}, null)
|
}, null)
|
||||||
}
|
}
|
||||||
property var mainAppIconSource: Quickshell.iconPath(Icons.noKnowledgeIconGuess(biggestWindow?.class))
|
property var mainAppIconSource: Quickshell.iconPath(Icons.noKnowledgeIconGuess(biggestWindow?.class), "image-missing")
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
opacity: (ConfigOptions.bar.workspaces.alwaysShowNumbers || GlobalStates.workspaceShowNumbers || !workspaceButtonBackground.biggestWindow) ? 1 : 0
|
opacity: (ConfigOptions.bar.workspaces.alwaysShowNumbers || GlobalStates.workspaceShowNumbers || !workspaceButtonBackground.biggestWindow) ? 1 : 0
|
||||||
|
|||||||
@@ -303,7 +303,7 @@ Item {
|
|||||||
sourceComponent: IconImage {
|
sourceComponent: IconImage {
|
||||||
implicitSize: 33
|
implicitSize: 33
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
source: Quickshell.iconPath(notificationObject.appIcon)
|
source: Quickshell.iconPath(notificationObject.appIcon, "image-missing")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loader {
|
Loader {
|
||||||
@@ -345,7 +345,7 @@ Item {
|
|||||||
sourceComponent: IconImage {
|
sourceComponent: IconImage {
|
||||||
implicitSize: 23
|
implicitSize: 23
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
source: Quickshell.iconPath(notificationObject.appIcon)
|
source: Quickshell.iconPath(notificationObject.appIcon, "image-missing")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ Rectangle { // Window
|
|||||||
property var iconToWindowRatio: 0.35
|
property var iconToWindowRatio: 0.35
|
||||||
property var xwaylandIndicatorToIconRatio: 0.35
|
property var xwaylandIndicatorToIconRatio: 0.35
|
||||||
property var iconToWindowRatioCompact: 0.6
|
property var iconToWindowRatioCompact: 0.6
|
||||||
property var iconPath: Quickshell.iconPath(Icons.noKnowledgeIconGuess(windowData?.class))
|
property var iconPath: Quickshell.iconPath(Icons.noKnowledgeIconGuess(windowData?.class), "image-missing")
|
||||||
property bool compactMode: Appearance.font.pixelSize.smaller * 4 > targetWindowHeight || Appearance.font.pixelSize.smaller * 4 > targetWindowWidth
|
property bool compactMode: Appearance.font.pixelSize.smaller * 4 > targetWindowHeight || Appearance.font.pixelSize.smaller * 4 > targetWindowWidth
|
||||||
|
|
||||||
x: initX
|
x: initX
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ Button {
|
|||||||
Component {
|
Component {
|
||||||
id: iconImageComponent
|
id: iconImageComponent
|
||||||
IconImage {
|
IconImage {
|
||||||
source: Quickshell.iconPath(root.itemIcon)
|
source: Quickshell.iconPath(root.itemIcon, "image-missing")
|
||||||
width: 35
|
width: 35
|
||||||
height: 35
|
height: 35
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ Item {
|
|||||||
sourceSize.height: 38
|
sourceSize.height: 38
|
||||||
source: {
|
source: {
|
||||||
const icon = Icons.noKnowledgeIconGuess(root.node.properties["application.icon-name"]);
|
const icon = Icons.noKnowledgeIconGuess(root.node.properties["application.icon-name"]);
|
||||||
return Quickshell.iconPath(icon);
|
return Quickshell.iconPath(icon, "image-missing");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user