Change some colors for the arrows in some setting selectors

Contributes to CURA-5876.
This commit is contained in:
Diego Prado Gesto 2018-12-11 16:35:59 +01:00
parent b993a7b0d9
commit f99c788eb6
14 changed files with 24 additions and 58 deletions

View file

@ -62,7 +62,7 @@ Button
id: buttonText id: buttonText
text: button.text text: button.text
color: button.enabled ? (button.hovered ? button.textHoverColor : button.textColor): button.textDisabledColor color: button.enabled ? (button.hovered ? button.textHoverColor : button.textColor): button.textDisabledColor
font: UM.Theme.getFont("action_button") font: UM.Theme.getFont("medium")
visible: text != "" visible: text != ""
renderType: Text.NativeRendering renderType: Text.NativeRendering
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter

View file

@ -20,8 +20,8 @@ Button
{ {
height: childrenRect.height height: childrenRect.height
color: parent.hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button") color: parent.hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button")
border.color: (parent.checked || parent.hovered) ? UM.Theme.getColor("primary") : UM.Theme.getColor("lining") border.color: parent.checked ? UM.Theme.getColor("primary") : UM.Theme.getColor("lining")
border.width: parent.checked ? UM.Theme.getSize("thick_lining").width : UM.Theme.getSize("default_lining").width border.width: UM.Theme.getSize("default_lining").width
radius: UM.Theme.getSize("default_radius").width radius: UM.Theme.getSize("default_radius").width
Column Column

View file

@ -60,7 +60,7 @@ Item
{ {
text: catalog.i18nc("@label", "Printer") text: catalog.i18nc("@label", "Printer")
width: Math.round(parent.width * 0.3) - UM.Theme.getSize("default_margin").width width: Math.round(parent.width * 0.3) - UM.Theme.getSize("default_margin").width
height: contentHeight // height: contentHeight
font: UM.Theme.getFont("default") font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text") color: UM.Theme.getColor("text")
anchors.verticalCenter: printerTypeSelector.verticalCenter anchors.verticalCenter: printerTypeSelector.verticalCenter
@ -72,7 +72,7 @@ Item
id: printerTypeSelector id: printerTypeSelector
text: Cura.MachineManager.activeMachineDefinitionName text: Cura.MachineManager.activeMachineDefinitionName
tooltip: Cura.MachineManager.activeMachineDefinitionName tooltip: Cura.MachineManager.activeMachineDefinitionName
height: UM.Theme.getSize("setting_control").height height: UM.Theme.getSize("print_setup_big_item").height
width: Math.round(parent.width * 0.7) + UM.Theme.getSize("default_margin").width width: Math.round(parent.width * 0.7) + UM.Theme.getSize("default_margin").width
anchors.right: parent.right anchors.right: parent.right
style: UM.Theme.styles.print_setup_header_button style: UM.Theme.styles.print_setup_header_button
@ -222,7 +222,7 @@ Item
Row Row
{ {
height: UM.Theme.getSize("print_setup_item").height height: UM.Theme.getSize("print_setup_big_item").height
visible: Cura.MachineManager.hasMaterials visible: Cura.MachineManager.hasMaterials
Label Label
@ -246,7 +246,7 @@ Item
text: Cura.MachineManager.activeStack != null ? Cura.MachineManager.activeStack.material.name : "" text: Cura.MachineManager.activeStack != null ? Cura.MachineManager.activeStack.material.name : ""
tooltip: text tooltip: text
height: UM.Theme.getSize("setting_control").height height: UM.Theme.getSize("print_setup_big_item").height
width: selectors.controlWidth width: selectors.controlWidth
style: UM.Theme.styles.print_setup_header_button style: UM.Theme.styles.print_setup_header_button
@ -260,7 +260,7 @@ Item
Row Row
{ {
height: UM.Theme.getSize("print_setup_item").height height: UM.Theme.getSize("print_setup_big_item").height
visible: Cura.MachineManager.hasVariants visible: Cura.MachineManager.hasVariants
Label Label
@ -280,7 +280,7 @@ Item
text: Cura.MachineManager.activeVariantName text: Cura.MachineManager.activeVariantName
tooltip: Cura.MachineManager.activeVariantName tooltip: Cura.MachineManager.activeVariantName
height: UM.Theme.getSize("setting_control").height height: UM.Theme.getSize("print_setup_big_item").height
width: selectors.controlWidth width: selectors.controlWidth
style: UM.Theme.styles.print_setup_header_button style: UM.Theme.styles.print_setup_header_button
activeFocusOnPress: true; activeFocusOnPress: true;

View file

@ -326,7 +326,7 @@ Item
return UM.Theme.getColor("action_button_text"); return UM.Theme.getColor("action_button_text");
} }
} }
font: UM.Theme.getFont("action_button") font: UM.Theme.getFont("medium")
text: text:
{ {
if(extruderModel == null) if(extruderModel == null)

View file

@ -320,7 +320,7 @@ Item
return UM.Theme.getColor("action_button_text"); return UM.Theme.getColor("action_button_text");
} }
} }
font: UM.Theme.getFont("action_button") font: UM.Theme.getFont("medium")
text: text:
{ {
if(printerModel == null) if(printerModel == null)

View file

@ -27,7 +27,7 @@ Item
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: UM.Theme.getSize("default_margin").width anchors.leftMargin: UM.Theme.getSize("default_margin").width
text: label text: label
font: UM.Theme.getFont("setting_category") font: UM.Theme.getFont("default")
color: UM.Theme.getColor("setting_category_text") color: UM.Theme.getColor("setting_category_text")
} }
} }

View file

@ -42,7 +42,7 @@ Button
} }
text: machineSelectorButton.text text: machineSelectorButton.text
color: UM.Theme.getColor("text") color: UM.Theme.getColor("text")
font: UM.Theme.getFont("action_button") font: UM.Theme.getFont("medium")
visible: text != "" visible: text != ""
renderType: Text.NativeRendering renderType: Text.NativeRendering
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter

View file

@ -73,7 +73,7 @@ Button
text: definition.label text: definition.label
textFormat: Text.PlainText textFormat: Text.PlainText
renderType: Text.NativeRendering renderType: Text.NativeRendering
font: UM.Theme.getFont("setting_category") font: UM.Theme.getFont("default")
color: color:
{ {
if (!base.enabled) if (!base.enabled)
@ -106,26 +106,7 @@ Button
width: UM.Theme.getSize("standard_arrow").width width: UM.Theme.getSize("standard_arrow").width
height: UM.Theme.getSize("standard_arrow").height height: UM.Theme.getSize("standard_arrow").height
sourceSize.height: width sourceSize.height: width
color: color: UM.Theme.getColor("setting_control_button")
{
if (!base.enabled)
{
return UM.Theme.getColor("setting_category_disabled_text")
}
else if ((base.hovered || base.activeFocus) && base.checkable && base.checked)
{
return UM.Theme.getColor("setting_category_active_hover_text")
}
else if (base.pressed || (base.checkable && base.checked))
{
return UM.Theme.getColor("setting_category_active_text")
}
else if (base.hovered || base.activeFocus)
{
return UM.Theme.getColor("setting_category_hover_text")
}
return UM.Theme.getColor("setting_category_text")
}
source: base.checked ? UM.Theme.getIcon("arrow_bottom") : UM.Theme.getIcon("arrow_left") source: base.checked ? UM.Theme.getIcon("arrow_bottom") : UM.Theme.getIcon("arrow_left")
} }
} }

View file

@ -63,7 +63,7 @@ SettingItem
sourceSize.width: width + 5 * screenScaleFactor sourceSize.width: width + 5 * screenScaleFactor
sourceSize.height: width + 5 * screenScaleFactor sourceSize.height: width + 5 * screenScaleFactor
color: UM.Theme.getColor("setting_control_text") color: UM.Theme.getColor("setting_control_button")
} }
contentItem: Label contentItem: Label

View file

@ -105,7 +105,7 @@ SettingItem
sourceSize.width: width + 5 * screenScaleFactor sourceSize.width: width + 5 * screenScaleFactor
sourceSize.height: width + 5 * screenScaleFactor sourceSize.height: width + 5 * screenScaleFactor
color: UM.Theme.getColor("setting_control_text"); color: UM.Theme.getColor("setting_control_button");
} }
background: Rectangle background: Rectangle

View file

@ -102,7 +102,7 @@ SettingItem
sourceSize.width: width + 5 * screenScaleFactor sourceSize.width: width + 5 * screenScaleFactor
sourceSize.height: width + 5 * screenScaleFactor sourceSize.height: width + 5 * screenScaleFactor
color: UM.Theme.getColor("setting_control_text"); color: UM.Theme.getColor("setting_control_button");
} }
background: Rectangle background: Rectangle

View file

@ -105,7 +105,7 @@ Cura.ExpandablePopup
id: buttonText id: buttonText
text: viewsSelectorButton.text text: viewsSelectorButton.text
color: UM.Theme.getColor("text") color: UM.Theme.getColor("text")
font: UM.Theme.getFont("action_button") font: UM.Theme.getFont("medium")
renderType: Text.NativeRendering renderType: Text.NativeRendering
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight elide: Text.ElideRight

View file

@ -75,7 +75,7 @@ QtObject
width: Theme.getSize("standard_arrow").width width: Theme.getSize("standard_arrow").width
height: Theme.getSize("standard_arrow").height height: Theme.getSize("standard_arrow").height
sourceSize.height: width sourceSize.height: width
color: control.enabled ? Theme.getColor("setting_category_text") : Theme.getColor("setting_category_disabled_text") color: control.enabled ? Theme.getColor("setting_control_button") : Theme.getColor("setting_category_disabled_text")
source: Theme.getIcon("arrow_bottom") source: Theme.getIcon("arrow_bottom")
} }
Label Label
@ -208,7 +208,7 @@ QtObject
anchors.verticalCenter: parent.verticalCenter; anchors.verticalCenter: parent.verticalCenter;
text: control.text; text: control.text;
font: Theme.getFont("button_tooltip"); font: Theme.getFont("default");
color: Theme.getColor("tooltip_text"); color: Theme.getColor("tooltip_text");
} }
} }
@ -446,7 +446,7 @@ QtObject
sourceSize.width: width + 5 * screenScaleFactor sourceSize.width: width + 5 * screenScaleFactor
sourceSize.height: width + 5 * screenScaleFactor sourceSize.height: width + 5 * screenScaleFactor
color: Theme.getColor("setting_control_text"); color: Theme.getColor("setting_control_button");
} }
} }
} }
@ -513,7 +513,7 @@ QtObject
sourceSize.width: width + 5 * screenScaleFactor sourceSize.width: width + 5 * screenScaleFactor
sourceSize.height: width + 5 * screenScaleFactor sourceSize.height: width + 5 * screenScaleFactor
color: UM.Theme.getColor("setting_control_text") color: UM.Theme.getColor("setting_control_button")
} }
} }
} }
@ -716,7 +716,7 @@ QtObject
return UM.Theme.getColor("action_button_text"); return UM.Theme.getColor("action_button_text");
} }
} }
font: UM.Theme.getFont("action_button") font: UM.Theme.getFont("medium")
text: control.text text: control.text
} }
} }

View file

@ -49,21 +49,6 @@
"size": 0.7, "size": 0.7,
"weight": 50, "weight": 50,
"family": "Noto Sans" "family": "Noto Sans"
},
"button_tooltip": {
"size": 1.0,
"weight": 50,
"family": "Noto Sans"
},
"setting_category": {
"size": 1.15,
"weight": 63,
"family": "Noto Sans"
},
"action_button": {
"size": 1.15,
"weight": 50,
"family": "Noto Sans"
} }
}, },