mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-06-07 20:31:31 +00:00
NImageRounded: attempt to fix crash on older Qt versions
This commit is contained in:
+16
-28
@@ -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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user