mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
launcher: fix invalid icon rendering wrong icon
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import Quickshell
|
||||
import Quickshell.Widgets
|
||||
import qs.Common
|
||||
@@ -54,7 +53,7 @@ Item {
|
||||
source: root.iconPath
|
||||
smooth: true
|
||||
asynchronous: true
|
||||
visible: !root.isMaterial && !root.isUnicode && status === Image.Ready
|
||||
visible: !root.isMaterial && !root.isUnicode && root.iconPath !== "" && status === Image.Ready
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
@@ -65,7 +64,7 @@ Item {
|
||||
anchors.rightMargin: root.fallbackRightMargin
|
||||
anchors.topMargin: root.fallbackTopMargin
|
||||
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
|
||||
radius: Theme.cornerRadius
|
||||
border.width: 0
|
||||
|
||||
@@ -45,7 +45,7 @@ Rectangle {
|
||||
width: computedIconSize
|
||||
height: computedIconSize
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
iconValue: model.icon && model.icon !== "" ? model.icon : model.startupClass
|
||||
iconValue: (model.icon && model.icon !== "") ? model.icon : ""
|
||||
iconSize: computedIconSize
|
||||
fallbackText: (model.name && model.name.length > 0) ? model.name.charAt(0).toUpperCase() : "A"
|
||||
materialIconSizeAdjustment: root.iconMaterialSizeAdjustment
|
||||
|
||||
@@ -46,7 +46,7 @@ Rectangle {
|
||||
width: root.iconSize
|
||||
height: root.iconSize
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
iconValue: model.icon && model.icon !== "" ? model.icon : model.startupClass
|
||||
iconValue: (model.icon && model.icon !== "") ? model.icon : ""
|
||||
iconSize: root.iconSize
|
||||
fallbackText: (model.name && model.name.length > 0) ? model.name.charAt(0).toUpperCase() : "A"
|
||||
iconMargins: root.iconMargins
|
||||
|
||||
Reference in New Issue
Block a user