Make hardcoded color themeable

CURA-6013
This commit is contained in:
Jaime van Kessel 2018-12-14 10:59:59 +01:00
parent 450f301c8c
commit 7616f9c97d
3 changed files with 5 additions and 3 deletions

View file

@ -81,13 +81,13 @@ Item
{ {
if(!ratingWidget.canRate) if(!ratingWidget.canRate)
{ {
return "#5a5a5a" return UM.Theme.getColor("rating_star")
} }
if((ratingWidget.indexHovered >= 0 || ratingWidget.userRating > 0) && isStarFilled) if((ratingWidget.indexHovered >= 0 || ratingWidget.userRating > 0) && isStarFilled)
{ {
return UM.Theme.getColor("primary") return UM.Theme.getColor("primary")
} }
return "#5a5a5a" return UM.Theme.getColor("rating_star")
} }
} }
onClicked: onClicked:

View file

@ -14,7 +14,7 @@ Row
{ {
id: starIcon id: starIcon
source: UM.Theme.getIcon("star_filled") source: UM.Theme.getIcon("star_filled")
color: model.user_rating == 0 ? "#5a5a5a" : UM.Theme.getColor("primary") color: model.user_rating == 0 ? UM.Theme.getColor("rating_star") : UM.Theme.getColor("primary")
height: UM.Theme.getSize("rating_star").height height: UM.Theme.getSize("rating_star").height
width: UM.Theme.getSize("rating_star").width width: UM.Theme.getSize("rating_star").width
} }

View file

@ -160,6 +160,8 @@
"extruder_button_material_border": [255, 255, 255, 255], "extruder_button_material_border": [255, 255, 255, 255],
"rating_star": [90, 90, 90, 255],
"sync_button_text": [120, 120, 120, 255], "sync_button_text": [120, 120, 120, 255],
"sync_button_text_hovered": [0, 0, 0, 255], "sync_button_text_hovered": [0, 0, 0, 255],