NImageRounded: attempt to fix crash on older Qt versions

This commit is contained in:
ItsLemmy
2025-11-25 20:56:00 -05:00
parent 58d4730814
commit 3c5dfd87db
+16 -28
View File
@@ -18,42 +18,30 @@ Item {
signal statusChanged(int status) signal statusChanged(int status)
ClippingWrapperRectangle { ClippingRectangle {
anchors.fill: parent anchors.fill: parent
color: Color.transparent color: Color.transparent
radius: root.radius radius: root.radius
border.color: root.borderColor border.color: root.borderColor
border.width: root.borderWidth border.width: root.borderWidth
Item { Image {
anchors.fill: parent anchors.fill: parent
Loader { visible: !showFallback
active: true source: imagePath
anchors.fill: parent mipmap: true
sourceComponent: showFallback ? fallback : image smooth: true
} asynchronous: true
antialiasing: true
fillMode: Image.PreserveAspectCrop
onStatusChanged: root.statusChanged(status)
}
Component { NIcon {
id: image anchors.centerIn: parent
Image { visible: showFallback
source: imagePath icon: fallbackIcon
mipmap: true pointSize: fallbackIconSize
smooth: true
asynchronous: true
antialiasing: true
fillMode: Image.PreserveAspectCrop
onStatusChanged: root.statusChanged(status)
}
}
Component {
id: fallback
NIcon {
anchors.centerIn: parent
icon: fallbackIcon
pointSize: fallbackIconSize
}
}
} }
} }
} }