Replace Theme property accessors with getThing calls

This commit is contained in:
Arjen Hiemstra 2016-01-21 18:56:18 +01:00 committed by Ghostkeeper
parent c50c223124
commit 720324f0c6
15 changed files with 255 additions and 229 deletions

View file

@ -18,7 +18,7 @@ Rectangle
property Action manageProfilesAction;
property int currentModeIndex;
color: UM.Theme.colors.sidebar;
color: UM.Theme.getColor("sidebar");
UM.I18nCatalog { id: catalog; name:"cura"}
function showTooltip(item, position, text)
@ -56,10 +56,10 @@ Rectangle
Rectangle {
id: headerSeparator
width: parent.width
height: UM.Theme.sizes.sidebar_lining.height
color: UM.Theme.colors.sidebar_lining
height: UM.Theme.getSize("sidebar_lining").height
color: UM.Theme.getColor("sidebar_lining")
anchors.top: header.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.topMargin: UM.Theme.getSize("default_margin").height
}
ProfileSetup {
@ -67,7 +67,7 @@ Rectangle
addProfileAction: base.addProfileAction
manageProfilesAction: base.manageProfilesAction
anchors.top: settingsModeSelection.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.topMargin: UM.Theme.getSize("default_margin").height
width: parent.width
height: totalHeightProfileSetup
}
@ -94,22 +94,22 @@ Rectangle
id: settingsModeLabel
text: catalog.i18nc("@label:listbox","Setup");
anchors.left: parent.left
anchors.leftMargin: UM.Theme.sizes.default_margin.width;
anchors.leftMargin: UM.Theme.getSize("default_margin").width;
anchors.top: headerSeparator.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.topMargin: UM.Theme.getSize("default_margin").height
width: parent.width/100*45
font: UM.Theme.fonts.large;
color: UM.Theme.colors.text
font: UM.Theme.getFont("large");
color: UM.Theme.getColor("text")
}
Rectangle {
id: settingsModeSelection
width: parent.width/100*55
height: UM.Theme.sizes.sidebar_header_mode_toggle.height
height: UM.Theme.getSize("sidebar_header_mode_toggle").height
anchors.right: parent.right
anchors.rightMargin: UM.Theme.sizes.default_margin.width
anchors.rightMargin: UM.Theme.getSize("default_margin").width
anchors.top: headerSeparator.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.topMargin: UM.Theme.getSize("default_margin").height
Component{
id: wizardDelegate
Button {
@ -126,20 +126,20 @@ Rectangle
style: ButtonStyle {
background: Rectangle {
border.width: UM.Theme.sizes.default_lining.width
border.color: control.checked ? UM.Theme.colors.toggle_checked_border :
control.pressed ? UM.Theme.colors.toggle_active_border :
control.hovered ? UM.Theme.colors.toggle_hovered_border : UM.Theme.colors.toggle_unchecked_border
color: control.checked ? UM.Theme.colors.toggle_checked :
control.pressed ? UM.Theme.colors.toggle_active :
control.hovered ? UM.Theme.colors.toggle_hovered : UM.Theme.colors.toggle_unchecked
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")
Behavior on color { ColorAnimation { duration: 50; } }
Label {
anchors.centerIn: parent
color: control.checked ? UM.Theme.colors.toggle_checked_text :
control.pressed ? UM.Theme.colors.toggle_active_text :
control.hovered ? UM.Theme.colors.toggle_hovered_text : UM.Theme.colors.toggle_unchecked_text
font: UM.Theme.fonts.default
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;
}
}
@ -165,7 +165,7 @@ Rectangle
anchors.bottom: footerSeparator.top
anchors.top: profileItem.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.topMargin: UM.Theme.getSize("default_margin").height
anchors.left: base.left
anchors.right: base.right
@ -201,10 +201,10 @@ Rectangle
Rectangle {
id: footerSeparator
width: parent.width
height: UM.Theme.sizes.sidebar_lining.height
color: UM.Theme.colors.sidebar_lining
height: UM.Theme.getSize("sidebar_lining").height
color: UM.Theme.getColor("sidebar_lining")
anchors.bottom: saveButton.top
anchors.bottomMargin: UM.Theme.sizes.default_margin.height
anchors.bottomMargin: UM.Theme.getSize("default_margin").height
}
SaveButton