mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 14:45:55 +08:00
Simplify the rating widget
CURA-6013
This commit is contained in:
parent
fcaa23ed0a
commit
4d57aa8ea4
@ -10,8 +10,6 @@ Item
|
|||||||
property int indexHovered: -1
|
property int indexHovered: -1
|
||||||
property string packageId: ""
|
property string packageId: ""
|
||||||
|
|
||||||
property int numRatings: 0
|
|
||||||
|
|
||||||
property int userRating: 0
|
property int userRating: 0
|
||||||
|
|
||||||
signal rated(int rating)
|
signal rated(int rating)
|
||||||
@ -88,14 +86,6 @@ Item
|
|||||||
onClicked: rated(index + 1) // Notify anyone who cares about this.
|
onClicked: rated(index + 1) // Notify anyone who cares about this.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Label
|
|
||||||
{
|
|
||||||
text: "(" + numRatings + ")"
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
height: parent.height
|
|
||||||
color: "#5a5a5a"
|
|
||||||
font: UM.Theme.getFont("small")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -135,8 +135,6 @@ Item
|
|||||||
id: rating
|
id: rating
|
||||||
visible: details.type == "plugin"
|
visible: details.type == "plugin"
|
||||||
packageId: details.id
|
packageId: details.id
|
||||||
rating: details.average_rating
|
|
||||||
numRatings: details.num_ratings
|
|
||||||
userRating: details.user_rating
|
userRating: details.user_rating
|
||||||
enabled: toolbox.isInstalled(details.id) && Cura.API.account.isLoggedIn
|
enabled: toolbox.isInstalled(details.id) && Cura.API.account.isLoggedIn
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user