mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-04 11:14:21 +08:00
CURA-5536 Add the installed check also to the featured items.
This commit is contained in:
parent
62b1d361fa
commit
dd7168e8b8
@ -9,6 +9,8 @@ import UM 1.1 as UM
|
|||||||
|
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
|
property int packageCount: toolbox.viewCategory == "material" ? model.package_count : 1
|
||||||
|
property int installedPackages: toolbox.viewCategory == "material" ? toolbox.getNumberOfInstalledPackagesByAuthor(model.id) : (toolbox.isInstalled(model.id) ? 1 : 0)
|
||||||
id: tileBase
|
id: tileBase
|
||||||
width: UM.Theme.getSize("toolbox_thumbnail_large").width + (2 * UM.Theme.getSize("default_lining").width)
|
width: UM.Theme.getSize("toolbox_thumbnail_large").width + (2 * UM.Theme.getSize("default_lining").width)
|
||||||
height: thumbnail.height + packageNameBackground.height + (2 * UM.Theme.getSize("default_lining").width)
|
height: thumbnail.height + packageNameBackground.height + (2 * UM.Theme.getSize("default_lining").width)
|
||||||
@ -36,6 +38,22 @@ Rectangle
|
|||||||
source: model.icon_url || "../images/logobot.svg"
|
source: model.icon_url || "../images/logobot.svg"
|
||||||
mipmap: true
|
mipmap: true
|
||||||
}
|
}
|
||||||
|
UM.RecolorImage
|
||||||
|
{
|
||||||
|
width: (parent.width * 0.3) | 0
|
||||||
|
height: (parent.height * 0.3) | 0
|
||||||
|
anchors
|
||||||
|
{
|
||||||
|
bottom: parent.bottom
|
||||||
|
right: parent.right
|
||||||
|
bottomMargin: UM.Theme.getSize("default_lining").width
|
||||||
|
}
|
||||||
|
sourceSize.width: width
|
||||||
|
sourceSize.height: height
|
||||||
|
visible: installedPackages != 0
|
||||||
|
color: (installedPackages == packageCount) ? UM.Theme.getColor("primary") : UM.Theme.getColor("border")
|
||||||
|
source: "../images/installed_check.svg"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user