Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Prado Gesto <d.pradogesto@ultimaker.com>2018-03-14 13:26:22 +0300
committerDiego Prado Gesto <d.pradogesto@ultimaker.com>2018-03-14 13:26:22 +0300
commitc69987b8240ba82464bb04a4e5c7057f664a5c22 (patch)
treebf33657e66e412c92e8c925fbd1c4097923e19ca /resources/qml/SidebarHeader.qml
parent86afd6f5ff3d8d8f77d325ee80068c0fc08a90ac (diff)
CURA-4870 Reintroduce the "Check compatibility" link in the sidebar
Diffstat (limited to 'resources/qml/SidebarHeader.qml')
-rw-r--r--resources/qml/SidebarHeader.qml68
1 files changed, 68 insertions, 0 deletions
diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml
index 74e189789d..5591f49797 100644
--- a/resources/qml/SidebarHeader.qml
+++ b/resources/qml/SidebarHeader.qml
@@ -468,6 +468,74 @@ Column
}
}
+ // Material info row
+ Item
+ {
+ id: materialInfoRow
+ height: Math.round(UM.Theme.getSize("sidebar_setup").height / 2)
+ visible: (Cura.MachineManager.hasVariants || Cura.MachineManager.hasMaterials) && !sidebar.monitoringPrint && !sidebar.hideSettings
+
+ anchors
+ {
+ left: parent.left
+ leftMargin: UM.Theme.getSize("sidebar_margin").width
+ right: parent.right
+ rightMargin: UM.Theme.getSize("sidebar_margin").width
+ }
+
+ Item {
+ height: UM.Theme.getSize("sidebar_setup").height
+ anchors.right: parent.right
+ width: Math.round(parent.width * 0.7 + UM.Theme.getSize("sidebar_margin").width)
+
+ UM.RecolorImage {
+ id: warningImage
+ anchors.right: materialInfoLabel.left
+ anchors.rightMargin: UM.Theme.getSize("default_margin").width
+ anchors.verticalCenter: parent.Bottom
+ source: UM.Theme.getIcon("warning")
+ width: UM.Theme.getSize("section_icon").width
+ height: UM.Theme.getSize("section_icon").height
+ color: UM.Theme.getColor("material_compatibility_warning")
+ visible: !Cura.MachineManager.isCurrentSetupSupported
+ }
+
+ Label {
+ id: materialInfoLabel
+ wrapMode: Text.WordWrap
+ text: "<a href='%1'>" + catalog.i18nc("@label", "Check compatibility") + "</a>"
+ font: UM.Theme.getFont("default")
+ color: UM.Theme.getColor("text")
+ linkColor: UM.Theme.getColor("text_link")
+ verticalAlignment: Text.AlignTop
+ anchors.top: parent.top
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+
+ MouseArea {
+ anchors.fill: parent
+ hoverEnabled: true
+ onClicked: {
+ // open the material URL with web browser
+ var version = UM.Application.version;
+ var machineName = Cura.MachineManager.activeMachine.definition.id;
+ var url = "https://ultimaker.com/materialcompatibility/" + version + "/" + machineName + "?utm_source=cura&utm_medium=software&utm_campaign=resources";
+ Qt.openUrlExternally(url);
+ }
+ onEntered: {
+ var content = catalog.i18nc("@tooltip", "Click to check the material compatibility on Ultimaker.com.");
+ base.showTooltip(
+ materialInfoRow,
+ Qt.point(-UM.Theme.getSize("sidebar_margin").width, 0),
+ catalog.i18nc("@tooltip", content)
+ );
+ }
+ onExited: base.hideTooltip();
+ }
+ }
+ }
+ }
+
UM.SettingPropertyProvider
{
id: machineExtruderCount