Add icon to settings that can only be set globally (for all extruders)

CURA-1758
This commit is contained in:
fieldOfView 2016-07-18 13:20:37 +02:00
parent 97b3dd8f70
commit 7302baa7da
5 changed files with 67 additions and 10367 deletions

View file

@ -181,6 +181,7 @@ Item {
onLoaded: {
settingLoader.item.showRevertButton = false
settingLoader.item.showInheritButton = false
settingLoader.item.showLinkedSettingIcon = false
settingLoader.item.doDepthIndentation = false
}

View file

@ -21,10 +21,12 @@ Item {
property var showRevertButton: true
property var showInheritButton: true
property var showLinkedSettingIcon: true
property var doDepthIndentation: true
// Create properties to put property provider stuff in (bindings break in qt 5.5.1 otherwise)
property var state: propertyProvider.properties.state
property var settablePerExtruder: propertyProvider.properties.settable_per_extruder
property var stackLevels: propertyProvider.stackLevels
property var stackLevel: stackLevels[0]
@ -131,6 +133,26 @@ Item {
verticalCenter: parent.verticalCenter
}
UM.SimpleButton
{
id: linkedSettingIcon;
visible: base.settablePerExtruder != "True" && base.showLinkedSettingIcon
height: parent.height;
width: height;
backgroundColor: UM.Theme.getColor("setting_control");
hoverBackgroundColor: UM.Theme.getColor("setting_control")
color: UM.Theme.getColor("setting_control_button")
hoverColor: UM.Theme.getColor("setting_control_button")
iconSource: UM.Theme.getIcon("link")
onEntered: { hoverTimer.stop(); base.showTooltip(catalog.i18nc("@label", "This setting is always shared between all extruders. Changing it here will change the value for all extruders")) }
onExited: base.showTooltip(base.tooltipText);
}
UM.SimpleButton
{
id: revertButton;
@ -231,7 +253,6 @@ Item {
onEntered: { hoverTimer.stop(); base.showTooltip(catalog.i18nc("@label", "This setting is normally calculated, but it currently has an absolute value set.\n\nClick to restore the calculated value.")) }
onExited: base.showTooltip(base.tooltipText);
}
}
Item

View file

@ -95,7 +95,7 @@ ScrollView
containerStackId: ExtruderManager.activeExtruderStackId ? ExtruderManager.activeExtruderStackId : Cura.MachineManager.activeMachineId
key: model.key ? model.key : ""
watchedProperties: [ "value", "enabled", "state", "validationState" ]
watchedProperties: [ "value", "enabled", "state", "validationState", "settable_per_extruder" ]
storeIndex: 0
}

View file

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.2"
id="Layer_1"
x="0px"
y="0px"
viewBox="0 0 250 250"
xml:space="preserve"
inkscape:version="0.91 r13725"
sodipodi:docname="link.svg"><metadata
id="metadata4192"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs4190" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1148"
id="namedview4188"
showgrid="false"
inkscape:zoom="0.58272057"
inkscape:cx="218.22031"
inkscape:cy="76.27121"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="Layer_1" /><path
inkscape:connector-curvature="0"
d="m 29.41175,183.82353 q 0,-6.12745 4.28922,-10.41667 l 31.86274,-31.86274 q 4.28922,-4.28921 10.41667,-4.28921 6.43382,0 11.02941,4.90196 -0.45956,0.45956 -2.91054,2.83394 -2.45098,2.37439 -3.2935,3.29351 -0.84253,0.91912 -2.2978,2.91054 -1.45527,1.99142 -1.99142,3.90625 -0.53615,1.91483 -0.53615,4.21262 0,6.12745 4.28921,10.41666 4.28922,4.28922 10.41667,4.28922 2.29779,0 4.21261,-0.53615 1.91483,-0.53616 3.90625,-1.99143 1.99143,-1.45527 2.91054,-2.29779 0.91912,-0.84252 3.29351,-3.2935 2.37439,-2.45098 2.83395,-2.91054 5.05514,4.74877 5.05514,11.18259 0,6.12746 -4.28921,10.41667 l -31.55637,31.70956 q -4.13603,4.13603 -10.41666,4.13603 -6.12746,0 -10.41667,-3.98284 l -22.51838,-22.3652 q -4.28922,-4.28922 -4.28922,-10.26348 z M 137.1017,75.827207 q 0,-6.12745 4.28922,-10.41666 l 31.55637,-31.70956 q 4.28922,-4.28922 10.41667,-4.28922 5.97426,0 10.41667,4.13603 l 22.51838,22.3652 q 4.28921,4.28921 4.28921,10.26348 0,6.12745 -4.28921,10.41667 l -31.86275,31.862743 q -4.13603,4.13603 -10.41666,4.13603 -6.43383,0 -11.02942,-4.74877 0.45956,-0.45956 2.91054,-2.83395 2.45098,-2.37439 3.29351,-3.2935 0.84252,-0.91912 2.29779,-2.910543 1.45527,-1.99143 1.99142,-3.90625 0.53616,-1.91483 0.53616,-4.21263 0,-6.12745 -4.28922,-10.41666 -4.28922,-4.28922 -10.41667,-4.28922 -2.29779,0 -4.21262,0.53615 -1.91483,0.53616 -3.90626,1.99142 -1.99141,1.45527 -2.91053,2.2978 -0.91912,0.84252 -3.29351,3.2935 -2.37438,2.45098 -2.83394,2.91054 -5.05515,-4.74877 -5.05515,-11.1826 z M 0,183.82353 q 0,18.38235 13.02082,31.09681 l 22.51838,22.3652 Q 48.25366,250 66.63602,250 q 18.53554,0 31.24999,-13.02083 l 31.55638,-31.70956 q 12.71446,-12.71446 12.71446,-31.09682 0,-18.8419 -13.48039,-32.01592 l 13.48039,-13.48039 q 13.17402,13.48039 31.86275,13.48039 18.38235,0 31.25,-12.86764 l 31.86274,-31.862753 q 12.86765,-12.86765 12.86765,-31.25 0,-18.38235 -13.02083,-31.09681 L 214.46077,12.714457 Q 201.74631,-2.8e-6 183.36396,-2.8e-6 q -18.53554,0 -31.25,13.0208298 l -31.55637,31.70957 q -12.71447,12.71446 -12.71447,31.09681 0,18.84192 13.4804,32.015943 l -13.4804,13.48039 Q 94.6691,107.84315 75.98038,107.84315 q -18.38235,0 -31.25,12.86764 L 12.86763,152.57354 Q 0,165.44118 0,183.82353 Z"
id="path4173" /></svg>

After

Width:  |  Height:  |  Size: 3.6 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 762 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Before After
Before After