mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 07:33:57 -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
|
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
|
height: childrenRect.height
|
||||||
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
|
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
|
||||||
Rectangle
|
Rectangle
|
||||||
|
@ -51,8 +53,8 @@ Item
|
||||||
}
|
}
|
||||||
sourceSize.width: width
|
sourceSize.width: width
|
||||||
sourceSize.height: height
|
sourceSize.height: height
|
||||||
visible: toolbox.isInstalled(model.id)
|
visible: installedPackages != 0
|
||||||
color: UM.Theme.getColor("primary")
|
color: (installedPackages == packageCount) ? UM.Theme.getColor("primary") : UM.Theme.getColor("border")
|
||||||
source: "../images/installed_check.svg"
|
source: "../images/installed_check.svg"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -63,7 +65,7 @@ Item
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
id: name
|
id: name
|
||||||
text: toolbox.viewCategory == "material" ? model.name + " (" + toolbox.getNumberOfInstalledPackagesByAuthor(model.id) + "/" + model.package_count + ")" : model.name
|
text: model.name
|
||||||
width: parent.width
|
width: parent.width
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
color: UM.Theme.getColor("text")
|
color: UM.Theme.getColor("text")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue