diff options
author | Ghostkeeper <rubend@tutanota.com> | 2020-08-20 17:35:52 +0300 |
---|---|---|
committer | Ghostkeeper <rubend@tutanota.com> | 2020-08-20 17:35:52 +0300 |
commit | 9ea418c0a1bcb5645a61b9534c61381e8c618e3a (patch) | |
tree | 2c495ae5acb4f1680944434905a86c6917e46e93 /resources | |
parent | a757dc7fa0b1b19efa1024132e2d6c94d2788626 (diff) |
Revert "Revert "Merge branch '4.7' of github.com:Ultimaker/Cura into 4.7""
This reverts commit 28f4d8513db7efce17bfd8b80fa7c8b237fd1c18.
The original revert was to revert an accidental merge from master to 4.7. This now reverts the revert on Master, so that we still have those changes on Master.
Diffstat (limited to 'resources')
-rw-r--r-- | resources/definitions/fdmprinter.def.json | 2 | ||||
-rw-r--r-- | resources/qml/PrintSetupTooltip.qml | 58 | ||||
-rw-r--r-- | resources/shaders/striped.shader | 7 |
3 files changed, 48 insertions, 19 deletions
diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 65a450b16f..c2e3571a62 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -6152,7 +6152,7 @@ "infill_mesh_order": { "label": "Mesh Processing Rank", - "description": "Determines the priority of this mesh when considering overlapping volumes. Areas where multiple meshes reside will be won by the lower rank mesh. An infill mesh with a higher order will modify the infill of infill meshes with lower order and normal meshes.", + "description": "Determines the priority of this mesh when considering multiple overlapping infill meshes. Areas where multiple infill meshes overlap will take on the settings of the mesh with the lowest rank. An infill mesh with a higher order will modify the infill of infill meshes with lower order and normal meshes.", "default_value": 0, "value": "1 if infill_mesh else 0", "minimum_value_warning": "1", diff --git a/resources/qml/PrintSetupTooltip.qml b/resources/qml/PrintSetupTooltip.qml index 41d68aef37..91f044ceed 100644 --- a/resources/qml/PrintSetupTooltip.qml +++ b/resources/qml/PrintSetupTooltip.qml @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Ultimaker B.V. +// Copyright (c) 2020 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 @@ -11,7 +11,7 @@ UM.PointingRectangle id: base property real sourceWidth: 0 width: UM.Theme.getSize("tooltip").width - height: label.height + UM.Theme.getSize("tooltip_margins").height * 2 + height: textScroll.height + UM.Theme.getSize("tooltip_margins").height * 2 color: UM.Theme.getColor("tooltip") arrowSize: UM.Theme.getSize("default_arrow").width @@ -59,22 +59,48 @@ UM.PointingRectangle base.opacity = 0; } - Label + MouseArea { - id: label; - anchors + enabled: parent.opacity > 0 + visible: enabled + anchors.fill: parent + acceptedButtons: Qt.NoButton + hoverEnabled: true + onHoveredChanged: { - top: parent.top; - topMargin: UM.Theme.getSize("tooltip_margins").height; - left: parent.left; - leftMargin: UM.Theme.getSize("tooltip_margins").width; - right: parent.right; - rightMargin: UM.Theme.getSize("tooltip_margins").width; + if(containsMouse && base.opacity > 0) + { + base.show(Qt.point(target.x - 1, target.y - UM.Theme.getSize("tooltip_arrow_margins").height / 2)); //Same arrow position as before. + } + else + { + base.hide(); + } + } + + ScrollView + { + id: textScroll + width: parent.width + height: Math.min(label.height, base.parent.height) + + ScrollBar.horizontal: ScrollBar { + active: false //Only allow vertical scrolling. We should grow vertically only, but due to how the label is positioned it allocates space in the ScrollView horizontally. + } + + Label + { + id: label + x: UM.Theme.getSize("tooltip_margins").width + y: UM.Theme.getSize("tooltip_margins").height + width: base.width - UM.Theme.getSize("tooltip_margins").width * 2 + + wrapMode: Text.Wrap; + textFormat: Text.RichText + font: UM.Theme.getFont("default"); + color: UM.Theme.getColor("tooltip_text"); + renderType: Text.NativeRendering + } } - wrapMode: Text.Wrap; - textFormat: Text.RichText - font: UM.Theme.getFont("default"); - color: UM.Theme.getColor("tooltip_text"); - renderType: Text.NativeRendering } } diff --git a/resources/shaders/striped.shader b/resources/shaders/striped.shader index 71b1f7b0fa..07ce2bebe6 100644 --- a/resources/shaders/striped.shader +++ b/resources/shaders/striped.shader @@ -29,6 +29,7 @@ fragment = uniform mediump vec4 u_diffuseColor1; uniform mediump vec4 u_diffuseColor2; uniform mediump vec4 u_specularColor; + uniform mediump float u_opacity; uniform highp vec3 u_lightPosition; uniform mediump float u_shininess; uniform highp vec3 u_viewPosition; @@ -65,7 +66,7 @@ fragment = finalColor += pow(NdotR, u_shininess) * u_specularColor; gl_FragColor = finalColor; - gl_FragColor.a = 1.0; + gl_FragColor.a = u_opacity; } vertex41core = @@ -100,6 +101,7 @@ fragment41core = uniform mediump vec4 u_diffuseColor1; uniform mediump vec4 u_diffuseColor2; uniform mediump vec4 u_specularColor; + uniform mediump float u_opacity; uniform highp vec3 u_lightPosition; uniform mediump float u_shininess; uniform highp vec3 u_viewPosition; @@ -138,7 +140,7 @@ fragment41core = finalColor += pow(NdotR, u_shininess) * u_specularColor; frag_color = finalColor; - frag_color.a = 1.0; + frag_color.a = u_opacity; } [defaults] @@ -146,6 +148,7 @@ u_ambientColor = [0.3, 0.3, 0.3, 1.0] u_diffuseColor1 = [1.0, 0.5, 0.5, 1.0] u_diffuseColor2 = [0.5, 0.5, 0.5, 1.0] u_specularColor = [0.4, 0.4, 0.4, 1.0] +u_opacity = 1.0 u_shininess = 20.0 u_width = 5.0 u_vertical_stripes = 0 |