mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-04 11:14:21 +08:00
added sourceSize property to qml's Image for better rendering
CURA-7162
This commit is contained in:
parent
3a0da99256
commit
1acfaf9705
@ -66,6 +66,8 @@ Item
|
|||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
width: UM.Theme.getSize("toolbox_thumbnail_small").width - UM.Theme.getSize("wide_margin").width
|
width: UM.Theme.getSize("toolbox_thumbnail_small").width - UM.Theme.getSize("wide_margin").width
|
||||||
height: UM.Theme.getSize("toolbox_thumbnail_small").height - UM.Theme.getSize("wide_margin").width
|
height: UM.Theme.getSize("toolbox_thumbnail_small").height - UM.Theme.getSize("wide_margin").width
|
||||||
|
sourceSize.width: width
|
||||||
|
sourceSize.height: height
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
source: model.icon_url || "../../images/placeholder.svg"
|
source: model.icon_url || "../../images/placeholder.svg"
|
||||||
mipmap: true
|
mipmap: true
|
||||||
|
@ -22,6 +22,8 @@ Rectangle
|
|||||||
id: thumbnail
|
id: thumbnail
|
||||||
height: UM.Theme.getSize("toolbox_thumbnail_large").height - 4 * UM.Theme.getSize("default_margin").height
|
height: UM.Theme.getSize("toolbox_thumbnail_large").height - 4 * UM.Theme.getSize("default_margin").height
|
||||||
width: UM.Theme.getSize("toolbox_thumbnail_large").height - 4 * UM.Theme.getSize("default_margin").height
|
width: UM.Theme.getSize("toolbox_thumbnail_large").height - 4 * UM.Theme.getSize("default_margin").height
|
||||||
|
sourceSize.height: height
|
||||||
|
sourceSize.width: width
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
source: model.icon_url || "../../images/placeholder.svg"
|
source: model.icon_url || "../../images/placeholder.svg"
|
||||||
mipmap: true
|
mipmap: true
|
||||||
|
@ -71,6 +71,8 @@ UM.Dialog{
|
|||||||
source: model.icon_url || "../../images/placeholder.svg"
|
source: model.icon_url || "../../images/placeholder.svg"
|
||||||
height: lineHeight
|
height: lineHeight
|
||||||
width: height
|
width: height
|
||||||
|
sourceSize.height: height
|
||||||
|
sourceSize.width: width
|
||||||
mipmap: true
|
mipmap: true
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
}
|
}
|
||||||
@ -114,6 +116,8 @@ UM.Dialog{
|
|||||||
source: model.icon_url || "../../images/placeholder.svg"
|
source: model.icon_url || "../../images/placeholder.svg"
|
||||||
height: lineHeight
|
height: lineHeight
|
||||||
width: height
|
width: height
|
||||||
|
sourceSize.height: height
|
||||||
|
sourceSize.width: width
|
||||||
mipmap: true
|
mipmap: true
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
}
|
}
|
||||||
|
@ -53,6 +53,8 @@ UM.Dialog
|
|||||||
id: icon
|
id: icon
|
||||||
width: 30 * screenScaleFactor
|
width: 30 * screenScaleFactor
|
||||||
height: width
|
height: width
|
||||||
|
sourceSize.width: width
|
||||||
|
sourceSize.height: height
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
source: licenseModel.iconUrl || "../../images/placeholder.svg"
|
source: licenseModel.iconUrl || "../../images/placeholder.svg"
|
||||||
mipmap: true
|
mipmap: true
|
||||||
|
@ -48,6 +48,10 @@ Item
|
|||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
source: details === null ? "" : (details.icon_url || "../../images/placeholder.svg")
|
source: details === null ? "" : (details.icon_url || "../../images/placeholder.svg")
|
||||||
mipmap: true
|
mipmap: true
|
||||||
|
height: UM.Theme.getSize("toolbox_thumbnail_large").height - 4 * UM.Theme.getSize("default_margin").height
|
||||||
|
width: UM.Theme.getSize("toolbox_thumbnail_large").height - 4 * UM.Theme.getSize("default_margin").height
|
||||||
|
sourceSize.height: height
|
||||||
|
sourceSize.width: width
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user