mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-05 13:03:59 -06:00
Merge branch '4.0' into unify_font_types
This commit is contained in:
commit
ef2fb53790
141 changed files with 1872 additions and 3377 deletions
|
@ -106,26 +106,7 @@ Button
|
|||
width: UM.Theme.getSize("standard_arrow").width
|
||||
height: UM.Theme.getSize("standard_arrow").height
|
||||
sourceSize.height: width
|
||||
color:
|
||||
{
|
||||
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")
|
||||
}
|
||||
color: UM.Theme.getColor("setting_control_button")
|
||||
source: base.checked ? UM.Theme.getIcon("arrow_bottom") : UM.Theme.getIcon("arrow_left")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ SettingItem
|
|||
sourceSize.width: width + 5 * screenScaleFactor
|
||||
sourceSize.height: width + 5 * screenScaleFactor
|
||||
|
||||
color: UM.Theme.getColor("setting_control_text")
|
||||
color: UM.Theme.getColor("setting_control_button")
|
||||
}
|
||||
|
||||
contentItem: Label
|
||||
|
|
|
@ -17,11 +17,16 @@ SettingItem
|
|||
id: control
|
||||
anchors.fill: parent
|
||||
|
||||
model: Cura.ExtrudersModel
|
||||
property var extrudersModel: CuraApplication.getExtrudersModel()
|
||||
|
||||
model: extrudersModel
|
||||
|
||||
Connections
|
||||
{
|
||||
target: extrudersModel
|
||||
onModelChanged:
|
||||
{
|
||||
control.color = getItem(control.currentIndex).color
|
||||
control.color = extrudersModel.getItem(control.currentIndex).color
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -105,7 +110,7 @@ SettingItem
|
|||
sourceSize.width: width + 5 * screenScaleFactor
|
||||
sourceSize.height: width + 5 * screenScaleFactor
|
||||
|
||||
color: UM.Theme.getColor("setting_control_text");
|
||||
color: UM.Theme.getColor("setting_control_button");
|
||||
}
|
||||
|
||||
background: Rectangle
|
||||
|
|
|
@ -12,15 +12,24 @@ SettingItem
|
|||
id: base
|
||||
property var focusItem: control
|
||||
|
||||
// Somehow if we directory set control.model to CuraApplication.getExtrudersModelWithOptional()
|
||||
// and in the Connections.onModelChanged use control.model as a reference, it will complain about
|
||||
// non-existing properties such as "onModelChanged" and "getItem". I guess if we access the model
|
||||
// via "control.model", it gives back a generic/abstract model instance. To avoid this, we add
|
||||
// this extra property to keep the ExtrudersModel and use this in the rest of the code.
|
||||
property var extrudersWithOptionalModel: CuraApplication.getExtrudersModelWithOptional()
|
||||
|
||||
contents: ComboBox
|
||||
{
|
||||
id: control
|
||||
anchors.fill: parent
|
||||
|
||||
model: Cura.ExtrudersModel
|
||||
model: base.extrudersWithOptionalModel
|
||||
|
||||
Connections
|
||||
{
|
||||
onModelChanged: control.color = getItem(control.currentIndex).color
|
||||
addOptionalExtruder: true
|
||||
target: base.extrudersWithOptionalModel
|
||||
onModelChanged: control.color = base.extrudersWithOptionalModel.getItem(control.currentIndex).color
|
||||
}
|
||||
|
||||
textRole: "name"
|
||||
|
@ -102,7 +111,7 @@ SettingItem
|
|||
sourceSize.width: width + 5 * screenScaleFactor
|
||||
sourceSize.height: width + 5 * screenScaleFactor
|
||||
|
||||
color: UM.Theme.getColor("setting_control_text");
|
||||
color: UM.Theme.getColor("setting_control_button");
|
||||
}
|
||||
|
||||
background: Rectangle
|
||||
|
|
|
@ -558,17 +558,6 @@ Item
|
|||
|
||||
onTriggered: Cura.Actions.configureSettingVisibility.trigger(contextMenu);
|
||||
}
|
||||
MenuSeparator {}
|
||||
MenuItem
|
||||
{
|
||||
text: catalog.i18nc("@action:inmenu", "Collapse All")
|
||||
onTriggered: definitionsModel.collapseAll()
|
||||
}
|
||||
MenuItem
|
||||
{
|
||||
text: catalog.i18nc("@action:inmenu", "Expand All")
|
||||
onTriggered: definitionsModel.expandRecursive()
|
||||
}
|
||||
}
|
||||
|
||||
UM.SettingPropertyProvider
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue