Fix syntax

This commit is contained in:
Arjen Hiemstra 2016-01-25 02:38:51 +01:00 committed by Ghostkeeper
parent 720324f0c6
commit d93055da1a
2 changed files with 24 additions and 15 deletions

View File

@ -127,18 +127,18 @@ Rectangle
style: ButtonStyle {
background: Rectangle {
border.width: UM.Theme.getSize("default_lining").width
border.color: control.checked ? UM.Theme.getColor("toggle_checked_border : ")
control.pressed ? UM.Theme.getColor("toggle_active_border :")
control.hovered ? UM.Theme.getColor("toggle_hovered_border : UM").Theme.getColor("toggle_unchecked_border")
color: control.checked ? UM.Theme.getColor("toggle_checked : ")
control.pressed ? UM.Theme.getColor("toggle_active :")
control.hovered ? UM.Theme.getColor("toggle_hovered : UM").Theme.getColor("toggle_unchecked")
border.color: control.checked ? UM.Theme.getColor("toggle_checked_border") :
control.pressed ? UM.Theme.getColor("toggle_active_border") :
control.hovered ? UM.Theme.getColor("toggle_hovered_border") : UM.Theme.getColor("toggle_unchecked_border")
color: control.checked ? UM.Theme.getColor("toggle_checked") :
control.pressed ? UM.Theme.getColor("toggle_active") :
control.hovered ? UM.Theme.getColor("toggle_hovered") : UM.Theme.getColor("toggle_unchecked")
Behavior on color { ColorAnimation { duration: 50; } }
Label {
anchors.centerIn: parent
color: control.checked ? UM.Theme.getColor("toggle_checked_text : ")
control.pressed ? UM.Theme.getColor("toggle_active_text :")
control.hovered ? UM.Theme.getColor("toggle_hovered_text : UM").Theme.getColor("toggle_unchecked_text")
color: control.checked ? UM.Theme.getColor("toggle_checked_text") :
control.pressed ? UM.Theme.getColor("toggle_active_text") :
control.hovered ? UM.Theme.getColor("toggle_hovered_text") : UM.Theme.getColor("toggle_unchecked_text")
font: UM.Theme.getFont("default")
text: control.text;
}

View File

@ -84,10 +84,19 @@ Item
width: (infillCellRight.width - 3 * UM.Theme.getSize("default_margin").width) / 4;
height: width
border.color: (infillListView.activeIndex == index) ? UM.Theme.getColor("setting_control_selected :")
(mousearea.containsMouse ? UM.Theme.getColor("setting_control_border_highlight : UM").Theme.getColor("setting_control_border)")
border.color: {
if(infillListView.activeIndex == index)
{
return UM.Theme.getColor("setting_control_selected")
}
else if(mousearea.containsMouse)
{
return UM.Theme.getColor("setting_control_border_highlight")
}
return UM.Theme.getColor("setting_control_border")
}
border.width: UM.Theme.getSize("default_lining").width
color: infillListView.activeIndex == index ? UM.Theme.getColor("setting_control_selected : "transparent"")
color: infillListView.activeIndex == index ? UM.Theme.getColor("setting_control_selected") : "transparent"
UM.RecolorImage {
id: infillIcon
@ -96,8 +105,8 @@ Item
sourceSize.width: width
sourceSize.height: width
source: UM.Theme.icons[model.icon];
color: (infillListView.activeIndex == index) ? UM.Theme.getColor("text_white : UM").Theme.getColor("text")
source: UM.Theme.getIcon(model.icon);
color: (infillListView.activeIndex == index) ? UM.Theme.getColor("text_white") : UM.Theme.getColor("text")
}
MouseArea {
@ -122,7 +131,7 @@ Item
id: infillLabel
anchors.top: infillIconLining.bottom
anchors.horizontalCenter: infillIconLining.horizontalCenter
color: infillListView.activeIndex == index ? UM.Theme.getColor("setting_control_text : UM").Theme.getColor("setting_control_border")
color: infillListView.activeIndex == index ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_border")
text: name
}
}