mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 07:27:29 -06:00
Fix PerObjectSettingsPanel layout
This commit is contained in:
parent
6863e15e20
commit
03e9694e32
1 changed files with 47 additions and 55 deletions
|
@ -20,7 +20,7 @@ Item {
|
||||||
anchors.top: parent.top;
|
anchors.top: parent.top;
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.left;
|
||||||
|
|
||||||
spacing: UM.Theme.sizes.default_lining.height;
|
spacing: UM.Theme.sizes.default_margin.height;
|
||||||
|
|
||||||
UM.SettingItem {
|
UM.SettingItem {
|
||||||
id: profileSelection
|
id: profileSelection
|
||||||
|
@ -28,7 +28,7 @@ Item {
|
||||||
width: UM.Theme.sizes.setting.width;
|
width: UM.Theme.sizes.setting.width;
|
||||||
height: UM.Theme.sizes.setting.height;
|
height: UM.Theme.sizes.setting.height;
|
||||||
|
|
||||||
name: catalog.i18nc("@label", "Profile")
|
name: catalog.i18nc("@label", "Object profile")
|
||||||
type: "enum"
|
type: "enum"
|
||||||
indent: false
|
indent: false
|
||||||
|
|
||||||
|
@ -44,62 +44,60 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item
|
Column {
|
||||||
{
|
id: customisedSettings
|
||||||
height: UM.Theme.sizes.default_margin.height
|
spacing: UM.Theme.sizes.default_lining.height;
|
||||||
width: parent.width
|
width: UM.Theme.sizes.setting.width + UM.Theme.sizes.setting.height/2;
|
||||||
}
|
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
id: settings;
|
id: settings;
|
||||||
|
|
||||||
model: UM.ActiveTool.properties.Model.getItem(base.currentIndex).settings
|
model: UM.ActiveTool.properties.Model.getItem(base.currentIndex).settings
|
||||||
|
|
||||||
UM.SettingItem {
|
UM.SettingItem {
|
||||||
width: UM.Theme.sizes.setting.width;
|
width: UM.Theme.sizes.setting.width;
|
||||||
height: UM.Theme.sizes.setting.height;
|
|
||||||
|
|
||||||
name: model.label;
|
|
||||||
type: model.type;
|
|
||||||
value: model.value;
|
|
||||||
description: model.description;
|
|
||||||
unit: model.unit;
|
|
||||||
valid: model.valid;
|
|
||||||
options: model.options
|
|
||||||
indent: false
|
|
||||||
|
|
||||||
style: UM.Theme.styles.setting_item;
|
|
||||||
|
|
||||||
onItemValueChanged: {
|
|
||||||
settings.model.setSettingValue(model.key, value)
|
|
||||||
}
|
|
||||||
|
|
||||||
Button
|
|
||||||
{
|
|
||||||
anchors.left: parent.left;
|
|
||||||
anchors.leftMargin: UM.Theme.sizes.default_margin.width;
|
|
||||||
|
|
||||||
width: UM.Theme.sizes.setting.height;
|
|
||||||
height: UM.Theme.sizes.setting.height;
|
height: UM.Theme.sizes.setting.height;
|
||||||
|
|
||||||
opacity: parent.hovered || hovered ? 1 : 0;
|
name: model.label;
|
||||||
onClicked: UM.ActiveTool.properties.Model.removeSettingOverride(UM.ActiveTool.properties.Model.getItem(base.currentIndex).id, model.key)
|
type: model.type;
|
||||||
|
value: model.value;
|
||||||
|
description: model.description;
|
||||||
|
unit: model.unit;
|
||||||
|
valid: model.valid;
|
||||||
|
options: model.options
|
||||||
|
indent: false
|
||||||
|
|
||||||
style: ButtonStyle
|
style: UM.Theme.styles.setting_item;
|
||||||
|
|
||||||
|
onItemValueChanged: {
|
||||||
|
settings.model.setSettingValue(model.key, value)
|
||||||
|
}
|
||||||
|
|
||||||
|
Button
|
||||||
{
|
{
|
||||||
background: Rectangle
|
anchors.left: parent.right;
|
||||||
|
|
||||||
|
width: UM.Theme.sizes.setting.height;
|
||||||
|
height: UM.Theme.sizes.setting.height;
|
||||||
|
|
||||||
|
onClicked: UM.ActiveTool.properties.Model.removeSettingOverride(UM.ActiveTool.properties.Model.getItem(base.currentIndex).id, model.key)
|
||||||
|
|
||||||
|
style: ButtonStyle
|
||||||
{
|
{
|
||||||
color: control.hovered ? control.parent.style.controlHighlightColor : control.parent.style.controlColor;
|
background: Rectangle
|
||||||
UM.RecolorImage
|
|
||||||
{
|
{
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
color: control.hovered ? control.parent.style.controlHighlightColor : control.parent.style.controlColor;
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
UM.RecolorImage
|
||||||
width: parent.width/2
|
{
|
||||||
height: parent.height/2
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
sourceSize.width: width
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
sourceSize.height: width
|
width: parent.width/2
|
||||||
color: UM.Theme.colors.setting_control_revert
|
height: parent.height/2
|
||||||
source: UM.Theme.icons.cross1
|
sourceSize.width: width
|
||||||
|
sourceSize.height: width
|
||||||
|
color: UM.Theme.colors.setting_control_revert
|
||||||
|
source: UM.Theme.icons.cross1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -107,12 +105,6 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item
|
|
||||||
{
|
|
||||||
height: UM.Theme.sizes.default_margin.height
|
|
||||||
width: parent.width
|
|
||||||
}
|
|
||||||
|
|
||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
id: customise_settings_button;
|
id: customise_settings_button;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue