1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-27 06:52:50 -05:00

launcher: fix invalid icon rendering wrong icon

This commit is contained in:
bbedward
2026-01-04 22:58:20 -05:00
parent 9b027df1d5
commit c1d95a3086
3 changed files with 4 additions and 5 deletions

View File

@@ -1,5 +1,4 @@
import QtQuick import QtQuick
import QtQuick.Controls
import Quickshell import Quickshell
import Quickshell.Widgets import Quickshell.Widgets
import qs.Common import qs.Common
@@ -54,7 +53,7 @@ Item {
source: root.iconPath source: root.iconPath
smooth: true smooth: true
asynchronous: true asynchronous: true
visible: !root.isMaterial && !root.isUnicode && status === Image.Ready visible: !root.isMaterial && !root.isUnicode && root.iconPath !== "" && status === Image.Ready
} }
Rectangle { Rectangle {
@@ -65,7 +64,7 @@ Item {
anchors.rightMargin: root.fallbackRightMargin anchors.rightMargin: root.fallbackRightMargin
anchors.topMargin: root.fallbackTopMargin anchors.topMargin: root.fallbackTopMargin
anchors.bottomMargin: root.fallbackBottomMargin anchors.bottomMargin: root.fallbackBottomMargin
visible: !root.isMaterial && !root.isUnicode && iconImg.status !== Image.Ready visible: !root.isMaterial && !root.isUnicode && (root.iconPath === "" || iconImg.status !== Image.Ready)
color: root.fallbackBackgroundColor color: root.fallbackBackgroundColor
radius: Theme.cornerRadius radius: Theme.cornerRadius
border.width: 0 border.width: 0

View File

@@ -45,7 +45,7 @@ Rectangle {
width: computedIconSize width: computedIconSize
height: computedIconSize height: computedIconSize
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
iconValue: model.icon && model.icon !== "" ? model.icon : model.startupClass iconValue: (model.icon && model.icon !== "") ? model.icon : ""
iconSize: computedIconSize iconSize: computedIconSize
fallbackText: (model.name && model.name.length > 0) ? model.name.charAt(0).toUpperCase() : "A" fallbackText: (model.name && model.name.length > 0) ? model.name.charAt(0).toUpperCase() : "A"
materialIconSizeAdjustment: root.iconMaterialSizeAdjustment materialIconSizeAdjustment: root.iconMaterialSizeAdjustment

View File

@@ -46,7 +46,7 @@ Rectangle {
width: root.iconSize width: root.iconSize
height: root.iconSize height: root.iconSize
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
iconValue: model.icon && model.icon !== "" ? model.icon : model.startupClass iconValue: (model.icon && model.icon !== "") ? model.icon : ""
iconSize: root.iconSize iconSize: root.iconSize
fallbackText: (model.name && model.name.length > 0) ? model.name.charAt(0).toUpperCase() : "A" fallbackText: (model.name && model.name.length > 0) ? model.name.charAt(0).toUpperCase() : "A"
iconMargins: root.iconMargins iconMargins: root.iconMargins