Added properties to make setting items more customisable

CURA-1278
This commit is contained in:
Jaime van Kessel 2016-06-02 15:52:25 +02:00
parent 388a345140
commit 64e4cd0041

View File

@ -18,6 +18,10 @@ Item {
property alias contents: controlContainer.children; property alias contents: controlContainer.children;
property alias hovered: mouse.containsMouse property alias hovered: mouse.containsMouse
property var showRevertButton: true
property var showInheritButton: true
property var doDepthIdentation: true
signal contextMenuRequested() signal contextMenuRequested()
signal showTooltip(string text); signal showTooltip(string text);
signal hideTooltip(); signal hideTooltip();
@ -93,7 +97,7 @@ Item {
id: label; id: label;
anchors.left: parent.left; anchors.left: parent.left;
anchors.leftMargin: (UM.Theme.getSize("section_icon_column").width + 5) + ((definition.depth - 1) * UM.Theme.getSize("setting_control_depth_margin").width) anchors.leftMargin: doDepthIdentation ? (UM.Theme.getSize("section_icon_column").width + 5) + ((definition.depth - 1) * UM.Theme.getSize("setting_control_depth_margin").width) : 0
anchors.right: settingControls.left; anchors.right: settingControls.left;
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
@ -124,7 +128,7 @@ Item {
{ {
id: revertButton; id: revertButton;
visible: propertyProvider.stackLevel == 0 visible: propertyProvider.stackLevel == 0 && base.showRevertButton
height: parent.height; height: parent.height;
width: height; width: height;
@ -151,7 +155,7 @@ Item {
id: inheritButton; id: inheritButton;
//visible: has_profile_value && base.has_inherit_function && base.is_enabled //visible: has_profile_value && base.has_inherit_function && base.is_enabled
visible: propertyProvider.properties.state == "InstanceState.User" && propertyProvider.stackLevel > 0 visible: propertyProvider.properties.state == "InstanceState.User" && propertyProvider.stackLevel > 0 && base.showInheritButton
height: parent.height; height: parent.height;
width: height; width: height;