mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2025-12-06 06:36:15 +00:00
NImageRounded: attempt to fix crash on older Qt versions
This commit is contained in:
@@ -18,42 +18,30 @@ Item {
|
||||
|
||||
signal statusChanged(int status)
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
ClippingRectangle {
|
||||
anchors.fill: parent
|
||||
color: Color.transparent
|
||||
radius: root.radius
|
||||
border.color: root.borderColor
|
||||
border.width: root.borderWidth
|
||||
|
||||
Item {
|
||||
Image {
|
||||
anchors.fill: parent
|
||||
Loader {
|
||||
active: true
|
||||
anchors.fill: parent
|
||||
sourceComponent: showFallback ? fallback : image
|
||||
}
|
||||
visible: !showFallback
|
||||
source: imagePath
|
||||
mipmap: true
|
||||
smooth: true
|
||||
asynchronous: true
|
||||
antialiasing: true
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
onStatusChanged: root.statusChanged(status)
|
||||
}
|
||||
|
||||
Component {
|
||||
id: image
|
||||
Image {
|
||||
source: imagePath
|
||||
mipmap: true
|
||||
smooth: true
|
||||
asynchronous: true
|
||||
antialiasing: true
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
onStatusChanged: root.statusChanged(status)
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: fallback
|
||||
NIcon {
|
||||
anchors.centerIn: parent
|
||||
icon: fallbackIcon
|
||||
pointSize: fallbackIconSize
|
||||
}
|
||||
}
|
||||
NIcon {
|
||||
anchors.centerIn: parent
|
||||
visible: showFallback
|
||||
icon: fallbackIcon
|
||||
pointSize: fallbackIconSize
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user