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

View File

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