mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 22:54:01 -06:00
CURA-5536 Set different colors indicating that all the inner packages
are installed of just some.
This commit is contained in:
parent
96cc1be2ff
commit
62b1d361fa
1 changed files with 5 additions and 3 deletions
|
@ -9,6 +9,8 @@ import UM 1.1 as UM
|
|||
|
||||
Item
|
||||
{
|
||||
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)
|
||||
height: childrenRect.height
|
||||
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
|
||||
Rectangle
|
||||
|
@ -51,8 +53,8 @@ Item
|
|||
}
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
visible: toolbox.isInstalled(model.id)
|
||||
color: UM.Theme.getColor("primary")
|
||||
visible: installedPackages != 0
|
||||
color: (installedPackages == packageCount) ? UM.Theme.getColor("primary") : UM.Theme.getColor("border")
|
||||
source: "../images/installed_check.svg"
|
||||
}
|
||||
}
|
||||
|
@ -63,7 +65,7 @@ Item
|
|||
Label
|
||||
{
|
||||
id: name
|
||||
text: toolbox.viewCategory == "material" ? model.name + " (" + toolbox.getNumberOfInstalledPackagesByAuthor(model.id) + "/" + model.package_count + ")" : model.name
|
||||
text: model.name
|
||||
width: parent.width
|
||||
wrapMode: Text.WordWrap
|
||||
color: UM.Theme.getColor("text")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue