From b135da866ac55db821b40ab4684765514e0f80b8 Mon Sep 17 00:00:00 2001 From: Nino van Hooff Date: Wed, 20 May 2020 16:03:24 +0200 Subject: [PATCH 01/11] Add Cura.API.connectionStatus CURA-7437 --- cura/API/ConnectionStatus.py | 64 ++++++++++++++++++++++++++++++++++++ cura/API/__init__.py | 7 ++++ 2 files changed, 71 insertions(+) create mode 100644 cura/API/ConnectionStatus.py diff --git a/cura/API/ConnectionStatus.py b/cura/API/ConnectionStatus.py new file mode 100644 index 0000000000..0dbe6a4293 --- /dev/null +++ b/cura/API/ConnectionStatus.py @@ -0,0 +1,64 @@ +from typing import Optional + +from PyQt5.QtCore import QObject, pyqtSignal, QTimer, pyqtProperty +from PyQt5.QtNetwork import QNetworkReply + +from UM.TaskManagement.HttpRequestManager import HttpRequestManager +from cura.UltimakerCloud import UltimakerCloudAuthentication + + +class ConnectionStatus(QObject): + """Status info for some web services""" + + UPDATE_INTERVAL = 5.0 # seconds + ULTIMAKER_CLOUD_STATUS_URL = UltimakerCloudAuthentication.CuraCloudAPIRoot + "/connect/v1/" + + __instance = None # type: Optional[ConnectionStatus] + + internetReachableChanged = pyqtSignal() + umCloudReachableChanged = pyqtSignal() + + @classmethod + def getInstance(cls, *args, **kwargs) -> "ConnectionStatus": + if cls.__instance is None: + cls.__instance = cls(*args, **kwargs) + return cls.__instance + + def __init__(self, parent: Optional["QObject"] = None): + super().__init__(parent) + + self._http = HttpRequestManager.getInstance() + self._statuses = { + self.ULTIMAKER_CLOUD_STATUS_URL: True, + "http://example.com": True + } + + # Create a timer for automatic updates + self._update_timer = QTimer() + self._update_timer.setInterval(int(self.UPDATE_INTERVAL * 1000)) + # The timer is restarted automatically + self._update_timer.setSingleShot(False) + self._update_timer.timeout.connect(self._update) + self._update_timer.start() + + @pyqtProperty(bool, notify=internetReachableChanged) + def isInternetReachable(self) -> bool: + # Is any of the test urls reachable? + return any(self._statuses.values()) + + def _update(self): + for url in self._statuses.keys(): + self._http.get( + url = url, + callback = self._statusCallback, + error_callback = self._statusCallback, + timeout = 5 + ) + + def _statusCallback(self, reply: QNetworkReply, error: QNetworkReply.NetworkError = None): + url = reply.request().url().toString() + prev_statuses = self._statuses.copy() + self._statuses[url] = HttpRequestManager.replyIndicatesSuccess(reply, error) + + if any(self._statuses.values()) != any(prev_statuses.values()): + self.internetReachableChanged.emit() diff --git a/cura/API/__init__.py b/cura/API/__init__.py index 26c9a4c829..bcd4032f97 100644 --- a/cura/API/__init__.py +++ b/cura/API/__init__.py @@ -5,6 +5,7 @@ from typing import Optional, TYPE_CHECKING from PyQt5.QtCore import QObject, pyqtProperty from cura.API.Backups import Backups +from cura.API.ConnectionStatus import ConnectionStatus from cura.API.Interface import Interface from cura.API.Account import Account @@ -45,6 +46,8 @@ class CuraAPI(QObject): # Backups API self._backups = Backups(self._application) + self._connectionStatus = ConnectionStatus() + # Interface API self._interface = Interface(self._application) @@ -55,6 +58,10 @@ class CuraAPI(QObject): def account(self) -> "Account": return self._account + @pyqtProperty(QObject, constant = True) + def connectionStatus(self) -> "ConnectionStatus": + return self._connectionStatus + @property def backups(self) -> "Backups": return self._backups From eef347ed6c424763d7f712a727520ef07d83dd61 Mon Sep 17 00:00:00 2001 From: Nino van Hooff Date: Wed, 20 May 2020 17:20:40 +0200 Subject: [PATCH 02/11] Add an cloud unavailable icon to the active printer icon CURA-7437 --- cura/Settings/MachineManager.py | 4 ++++ .../src/Cloud/CloudOutputDeviceManager.py | 4 ++-- .../Network/LocalClusterOutputDeviceManager.py | 2 +- .../qml/PrinterSelector/MachineSelector.qml | 18 ++++++++++++------ .../icons/printer_cloud_not_available.svg | 18 ++++++++++++++++++ resources/themes/cura-light/theme.json | 4 +++- 6 files changed, 40 insertions(+), 10 deletions(-) create mode 100644 resources/themes/cura-light/icons/printer_cloud_not_available.svg diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 8f1a8bb7f8..effdb3866a 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -490,6 +490,10 @@ class MachineManager(QObject): def activeMachineHasCloudConnection(self) -> bool: # A cloud connection is only available if any output device actually is a cloud connected device. return any(d.connectionType == ConnectionType.CloudConnection for d in self._printer_output_devices) + + @pyqtProperty(bool, notify = printerConnectedStatusChanged) + def activeMachineHasCloudRegistration(self) -> bool: + return self.activeMachine is not None and ConnectionType.CloudConnection in self.activeMachine.configuredConnectionTypes @pyqtProperty(bool, notify = printerConnectedStatusChanged) def activeMachineIsUsingCloudConnection(self) -> bool: diff --git a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py index f233e59fe5..5f564bc6ad 100644 --- a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py +++ b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py @@ -106,8 +106,8 @@ class CloudOutputDeviceManager: self._onDevicesDiscovered(new_clusters) removed_device_keys = set(self._remote_clusters.keys()) - set(online_clusters.keys()) - for device_id in removed_device_keys: - self._onDiscoveredDeviceRemoved(device_id) + # for device_id in removed_device_keys: + # self._onDiscoveredDeviceRemoved(device_id) if new_clusters or removed_device_keys: self.discoveredDevicesChanged.emit() diff --git a/plugins/UM3NetworkPrinting/src/Network/LocalClusterOutputDeviceManager.py b/plugins/UM3NetworkPrinting/src/Network/LocalClusterOutputDeviceManager.py index 273c64ef4d..3410898269 100644 --- a/plugins/UM3NetworkPrinting/src/Network/LocalClusterOutputDeviceManager.py +++ b/plugins/UM3NetworkPrinting/src/Network/LocalClusterOutputDeviceManager.py @@ -265,7 +265,7 @@ class LocalClusterOutputDeviceManager: ## Nudge the user to start using Ultimaker Cloud. @staticmethod def _showCloudFlowMessage(device: LocalClusterOutputDevice) -> None: - if CuraApplication.getInstance().getMachineManager().activeMachineIsUsingCloudConnection: + if CuraApplication.getInstance().getMachineManager().activeMachineHasCloudRegistration: # This printer is already cloud connected, so we do not bother the user anymore. return if not CuraApplication.getInstance().getCuraAPI().account.isLoggedIn: diff --git a/resources/qml/PrinterSelector/MachineSelector.qml b/resources/qml/PrinterSelector/MachineSelector.qml index 2a101e4ae3..4cbae378f9 100644 --- a/resources/qml/PrinterSelector/MachineSelector.qml +++ b/resources/qml/PrinterSelector/MachineSelector.qml @@ -5,14 +5,15 @@ import QtQuick 2.7 import QtQuick.Controls 2.3 import UM 1.2 as UM -import Cura 1.0 as Cura +import Cura 1.1 as Cura Cura.ExpandablePopup { id: machineSelector property bool isNetworkPrinter: Cura.MachineManager.activeMachineHasNetworkConnection - property bool isCloudPrinter: Cura.MachineManager.activeMachineHasCloudConnection + property bool isConnectedCloudPrinter: Cura.MachineManager.activeMachineHasCloudConnection + property bool isCloudRegistered: Cura.MachineManager.activeMachineHasCloudRegistration property bool isGroup: Cura.MachineManager.activeMachineIsGroup contentPadding: UM.Theme.getSize("default_lining").width @@ -44,7 +45,7 @@ Cura.ExpandablePopup { return UM.Theme.getIcon("printer_group") } - else if (isNetworkPrinter || isCloudPrinter) + else if (isNetworkPrinter || isCloudRegistered) { return UM.Theme.getIcon("printer_single") } @@ -72,10 +73,14 @@ Cura.ExpandablePopup { return UM.Theme.getIcon("printer_connected") } - else if (isCloudPrinter) + else if (isConnectedCloudPrinter) { return UM.Theme.getIcon("printer_cloud_connected") } + else if (isCloudRegistered) + { + return UM.Theme.getIcon("printer_cloud_not_available") + } else { return "" @@ -85,8 +90,9 @@ Cura.ExpandablePopup width: UM.Theme.getSize("printer_status_icon").width height: UM.Theme.getSize("printer_status_icon").height - color: UM.Theme.getColor("primary") - visible: isNetworkPrinter || isCloudPrinter + color: source == UM.Theme.getIcon("printer_cloud_not_available") ? UM.Theme.getColor("cloud_unavailable") : UM.Theme.getColor("primary") + + visible: isNetworkPrinter || isCloudRegistered // Make a themable circle in the background so we can change it in other themes Rectangle diff --git a/resources/themes/cura-light/icons/printer_cloud_not_available.svg b/resources/themes/cura-light/icons/printer_cloud_not_available.svg new file mode 100644 index 0000000000..248df27338 --- /dev/null +++ b/resources/themes/cura-light/icons/printer_cloud_not_available.svg @@ -0,0 +1,18 @@ + + + + Artboard Copy 4 + Created with Sketch. + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index b870603bd9..0bc09701b2 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -438,7 +438,9 @@ "monitor_shadow": [200, 200, 200, 255], "monitor_carousel_dot": [216, 216, 216, 255], - "monitor_carousel_dot_current": [119, 119, 119, 255] + "monitor_carousel_dot_current": [119, 119, 119, 255], + + "cloud_unavailable": [153, 153, 153, 255] }, "sizes": { From 2eaa366424487625bd22c07995105706fb655366 Mon Sep 17 00:00:00 2001 From: Nino van Hooff Date: Tue, 26 May 2020 11:55:54 +0200 Subject: [PATCH 03/11] WIP: add tooltip to connection status icon wip: content and position CURA-7437 --- resources/qml/ExpandablePopup.qml | 22 ++++++++++--------- .../qml/PrinterSelector/MachineSelector.qml | 22 +++++++++++++++++++ 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/resources/qml/ExpandablePopup.qml b/resources/qml/ExpandablePopup.qml index 18255939ab..eb949a84ec 100644 --- a/resources/qml/ExpandablePopup.qml +++ b/resources/qml/ExpandablePopup.qml @@ -35,7 +35,8 @@ Item property color headerActiveColor: UM.Theme.getColor("secondary") property color headerHoverColor: UM.Theme.getColor("action_button_hovered") - property alias enabled: mouseArea.enabled + property alias mouseArea: headerMouseArea + property alias enabled: headerMouseArea.enabled // Text to show when this component is disabled property alias disabledText: disabledLabel.text @@ -139,6 +140,16 @@ Item anchors.fill: parent visible: base.enabled + MouseArea + { + id: headerMouseArea + anchors.fill: parent + onClicked: toggleContent() + hoverEnabled: true + onEntered: background.color = headerHoverColor + onExited: background.color = base.enabled ? headerBackgroundColor : UM.Theme.getColor("disabled") + } + Loader { id: headerItemLoader @@ -180,15 +191,6 @@ Item } } - MouseArea - { - id: mouseArea - anchors.fill: parent - onClicked: toggleContent() - hoverEnabled: true - onEntered: background.color = headerHoverColor - onExited: background.color = base.enabled ? headerBackgroundColor : UM.Theme.getColor("disabled") - } } DropShadow diff --git a/resources/qml/PrinterSelector/MachineSelector.qml b/resources/qml/PrinterSelector/MachineSelector.qml index 4cbae378f9..1530a9b215 100644 --- a/resources/qml/PrinterSelector/MachineSelector.qml +++ b/resources/qml/PrinterSelector/MachineSelector.qml @@ -60,6 +60,7 @@ Cura.ExpandablePopup UM.RecolorImage { + id: connectionStatusImage anchors { bottom: parent.bottom @@ -106,6 +107,27 @@ Cura.ExpandablePopup color: UM.Theme.getColor("main_background") z: parent.z - 1 } + + MouseArea // Connection status tooltip hover area + { + id: connectionStatusTooltipHoverArea + anchors.fill: parent + hoverEnabled: true + enabled: true // todo + acceptedButtons: Qt.NoButton // react to hover only, don't steal clicks + + onEntered: + { + base.showTooltip( + connectionStatusImage, + Qt.point(0, 0), + "blaat blaat" + ); //todo + machineSelector.mouseArea.entered() // we want both this and the outer area to be entered + } + onExited: base.hideTooltip() + } + } } From de5c6f9318aa275ac2b25deeab5ffc35b5685ddc Mon Sep 17 00:00:00 2001 From: Nino van Hooff Date: Tue, 26 May 2020 13:37:47 +0200 Subject: [PATCH 04/11] Set connection status icon + color based on new states CURA-7437 --- .../qml/PrinterSelector/MachineSelector.qml | 41 ++++++++++--------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/resources/qml/PrinterSelector/MachineSelector.qml b/resources/qml/PrinterSelector/MachineSelector.qml index 1530a9b215..7cc68896ae 100644 --- a/resources/qml/PrinterSelector/MachineSelector.qml +++ b/resources/qml/PrinterSelector/MachineSelector.qml @@ -16,6 +16,25 @@ Cura.ExpandablePopup property bool isCloudRegistered: Cura.MachineManager.activeMachineHasCloudRegistration property bool isGroup: Cura.MachineManager.activeMachineIsGroup + property string connectionStatus: { + if (isNetworkPrinter) + { + return "printer_connected" + } + else if (isConnectedCloudPrinter) + { + return "printer_cloud_connected" + } + else if (isCloudRegistered) + { + return "printer_cloud_not_available" + } + else + { + return "" + } + } + contentPadding: UM.Theme.getSize("default_lining").width contentAlignment: Cura.ExpandablePopup.ContentAlignment.AlignLeft @@ -68,30 +87,12 @@ Cura.ExpandablePopup leftMargin: UM.Theme.getSize("thick_margin").width } - source: - { - if (isNetworkPrinter) - { - return UM.Theme.getIcon("printer_connected") - } - else if (isConnectedCloudPrinter) - { - return UM.Theme.getIcon("printer_cloud_connected") - } - else if (isCloudRegistered) - { - return UM.Theme.getIcon("printer_cloud_not_available") - } - else - { - return "" - } - } + source: UM.Theme.getIcon(connectionStatus) width: UM.Theme.getSize("printer_status_icon").width height: UM.Theme.getSize("printer_status_icon").height - color: source == UM.Theme.getIcon("printer_cloud_not_available") ? UM.Theme.getColor("cloud_unavailable") : UM.Theme.getColor("primary") + color: connectionStatus == "printer_cloud_not_available" ? UM.Theme.getColor("cloud_unavailable") : UM.Theme.getColor("primary") visible: isNetworkPrinter || isCloudRegistered From 4d5ef91c439808f77f32f019c5825e461c1778b8 Mon Sep 17 00:00:00 2001 From: Nino van Hooff Date: Tue, 26 May 2020 13:50:15 +0200 Subject: [PATCH 05/11] Add connection status message CURA-7437 --- .../qml/PrinterSelector/MachineSelector.qml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/resources/qml/PrinterSelector/MachineSelector.qml b/resources/qml/PrinterSelector/MachineSelector.qml index 7cc68896ae..f7233d31e6 100644 --- a/resources/qml/PrinterSelector/MachineSelector.qml +++ b/resources/qml/PrinterSelector/MachineSelector.qml @@ -16,7 +16,7 @@ Cura.ExpandablePopup property bool isCloudRegistered: Cura.MachineManager.activeMachineHasCloudRegistration property bool isGroup: Cura.MachineManager.activeMachineIsGroup - property string connectionStatus: { + readonly property string connectionStatus: { if (isNetworkPrinter) { return "printer_connected" @@ -35,6 +35,15 @@ Cura.ExpandablePopup } } + readonly property string connectionStatusMessage: { + if (connectionStatus == "printer_cloud_not_available") + { + return "The cloud connection is currently unavailable. Please check your internet connection and sign in to connect to the cloud printer" + } else { + return "" + } + } + contentPadding: UM.Theme.getSize("default_lining").width contentAlignment: Cura.ExpandablePopup.ContentAlignment.AlignLeft @@ -113,8 +122,7 @@ Cura.ExpandablePopup { id: connectionStatusTooltipHoverArea anchors.fill: parent - hoverEnabled: true - enabled: true // todo + hoverEnabled: connectionStatusMessage !== "" acceptedButtons: Qt.NoButton // react to hover only, don't steal clicks onEntered: @@ -122,8 +130,8 @@ Cura.ExpandablePopup base.showTooltip( connectionStatusImage, Qt.point(0, 0), - "blaat blaat" - ); //todo + connectionStatusMessage + ); //todo: positioning machineSelector.mouseArea.entered() // we want both this and the outer area to be entered } onExited: base.hideTooltip() From 8c28dd8d840d6b42f5ea31d6b54b83e7b3ac45e1 Mon Sep 17 00:00:00 2001 From: Nino van Hooff Date: Tue, 26 May 2020 13:58:21 +0200 Subject: [PATCH 06/11] Check for internet when determining connection status CURA-7437 --- resources/qml/PrinterSelector/MachineSelector.qml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/resources/qml/PrinterSelector/MachineSelector.qml b/resources/qml/PrinterSelector/MachineSelector.qml index f7233d31e6..5fc750755d 100644 --- a/resources/qml/PrinterSelector/MachineSelector.qml +++ b/resources/qml/PrinterSelector/MachineSelector.qml @@ -21,7 +21,7 @@ Cura.ExpandablePopup { return "printer_connected" } - else if (isConnectedCloudPrinter) + else if (isConnectedCloudPrinter && Cura.API.connectionStatus.isInternetReachable) { return "printer_cloud_connected" } @@ -38,7 +38,11 @@ Cura.ExpandablePopup readonly property string connectionStatusMessage: { if (connectionStatus == "printer_cloud_not_available") { - return "The cloud connection is currently unavailable. Please check your internet connection and sign in to connect to the cloud printer" + if(Cura.API.connectionStatus.isInternetReachable){ + return catalog.i18nc("@status", "The cloud connection is currently unavailable. Please check your internet connection and sign in to connect to the cloud printer.") + } else { + return catalog.i18nc("@status", "The cloud connection is currently unavailable. Please check your internet connection.") + } } else { return "" } From 5f574d4b64ab0114b19b843acbc70e006bbe69d1 Mon Sep 17 00:00:00 2001 From: Nino van Hooff Date: Tue, 26 May 2020 16:21:51 +0200 Subject: [PATCH 07/11] Fix the connection status tooltip CURA-7437 --- .../qml/PrinterSelector/MachineSelector.qml | 45 ++++++++++++------- resources/qml/ToolTip.qml | 15 +++++++ 2 files changed, 43 insertions(+), 17 deletions(-) diff --git a/resources/qml/PrinterSelector/MachineSelector.qml b/resources/qml/PrinterSelector/MachineSelector.qml index 5fc750755d..064433fea5 100644 --- a/resources/qml/PrinterSelector/MachineSelector.qml +++ b/resources/qml/PrinterSelector/MachineSelector.qml @@ -122,25 +122,36 @@ Cura.ExpandablePopup z: parent.z - 1 } - MouseArea // Connection status tooltip hover area - { - id: connectionStatusTooltipHoverArea - anchors.fill: parent - hoverEnabled: connectionStatusMessage !== "" - acceptedButtons: Qt.NoButton // react to hover only, don't steal clicks + } - onEntered: - { - base.showTooltip( - connectionStatusImage, - Qt.point(0, 0), - connectionStatusMessage - ); //todo: positioning - machineSelector.mouseArea.entered() // we want both this and the outer area to be entered - } - onExited: base.hideTooltip() - } + MouseArea // Connection status tooltip hover area + { + id: connectionStatusTooltipHoverArea + anchors.fill: parent + hoverEnabled: connectionStatusMessage !== "" + acceptedButtons: Qt.NoButton // react to hover only, don't steal clicks + onEntered: + { + machineSelector.mouseArea.entered() // we want both this and the outer area to be entered + tooltip.show() + } + onExited: { tooltip.hide() } + } + + Cura.ToolTip + { + id: tooltip + + width: 250 * screenScaleFactor + tooltipText: connectionStatusMessage + arrowSize: UM.Theme.getSize("button_tooltip_arrow").width + x: connectionStatusImage.x - UM.Theme.getSize("narrow_margin").width + y: connectionStatusImage.y + connectionStatusImage.height + UM.Theme.getSize("narrow_margin").height + targetPoint: Qt.point( + connectionStatusImage.x + Math.round(connectionStatusImage.width / 2), + connectionStatusImage.y + ) } } diff --git a/resources/qml/ToolTip.qml b/resources/qml/ToolTip.qml index e82caf01b2..d4a9bc40d5 100644 --- a/resources/qml/ToolTip.qml +++ b/resources/qml/ToolTip.qml @@ -19,6 +19,7 @@ ToolTip property int contentAlignment: Cura.ToolTip.ContentAlignment.AlignRight property alias tooltipText: tooltip.text + property alias arrowSize: backgroundRect.arrowSize property var targetPoint: Qt.point(parent.x, y + Math.round(height/2)) id: tooltip @@ -26,6 +27,11 @@ ToolTip delay: 500 font: UM.Theme.getFont("default") + Behavior on opacity + { + NumberAnimation { duration: 100; } + } + // If the text is not set, just set the height to 0 to prevent it from showing height: text != "" ? label.contentHeight + 2 * UM.Theme.getSize("thin_margin").width: 0 @@ -60,4 +66,13 @@ ToolTip color: UM.Theme.getColor("tooltip_text") renderType: Text.NativeRendering } + + function show() { + visible = true + opacity = 1 + } + + function hide() { + opacity = 0 + } } \ No newline at end of file From ca333b4e8a96b3b423ee6237cccd6b1d3e554dad Mon Sep 17 00:00:00 2001 From: Nino van Hooff Date: Tue, 26 May 2020 16:45:17 +0200 Subject: [PATCH 08/11] Revert commented lines CURA-7437 --- .../UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py index 5f564bc6ad..f233e59fe5 100644 --- a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py +++ b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py @@ -106,8 +106,8 @@ class CloudOutputDeviceManager: self._onDevicesDiscovered(new_clusters) removed_device_keys = set(self._remote_clusters.keys()) - set(online_clusters.keys()) - # for device_id in removed_device_keys: - # self._onDiscoveredDeviceRemoved(device_id) + for device_id in removed_device_keys: + self._onDiscoveredDeviceRemoved(device_id) if new_clusters or removed_device_keys: self.discoveredDevicesChanged.emit() From 8a12f539b555af4e753605ddf49f6b168ad6dfec Mon Sep 17 00:00:00 2001 From: Nino van Hooff Date: Wed, 27 May 2020 16:37:48 +0200 Subject: [PATCH 09/11] Fix connection status z-order CURA-7437 --- resources/qml/PrinterSelector/MachineSelector.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/qml/PrinterSelector/MachineSelector.qml b/resources/qml/PrinterSelector/MachineSelector.qml index 064433fea5..2896588341 100644 --- a/resources/qml/PrinterSelector/MachineSelector.qml +++ b/resources/qml/PrinterSelector/MachineSelector.qml @@ -148,6 +148,7 @@ Cura.ExpandablePopup arrowSize: UM.Theme.getSize("button_tooltip_arrow").width x: connectionStatusImage.x - UM.Theme.getSize("narrow_margin").width y: connectionStatusImage.y + connectionStatusImage.height + UM.Theme.getSize("narrow_margin").height + z: popup.z + 1 targetPoint: Qt.point( connectionStatusImage.x + Math.round(connectionStatusImage.width / 2), connectionStatusImage.y From e24797b94ed39debdd58b925b5ade3eb8e8cf0e4 Mon Sep 17 00:00:00 2001 From: Nino van Hooff Date: Wed, 27 May 2020 17:21:50 +0200 Subject: [PATCH 10/11] Fix tooltip with alpha 0 stealing clicks CURA-7437 --- resources/qml/ToolTip.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/qml/ToolTip.qml b/resources/qml/ToolTip.qml index d4a9bc40d5..ad58038d01 100644 --- a/resources/qml/ToolTip.qml +++ b/resources/qml/ToolTip.qml @@ -26,6 +26,8 @@ ToolTip text: "" delay: 500 font: UM.Theme.getFont("default") + visible: opacity != 0.0 + opacity: 0.0 // initially hidden Behavior on opacity { @@ -68,7 +70,6 @@ ToolTip } function show() { - visible = true opacity = 1 } From fbddf88462b0f022fa02d793ab4f08658302447a Mon Sep 17 00:00:00 2001 From: Nino van Hooff Date: Thu, 28 May 2020 09:56:41 +0200 Subject: [PATCH 11/11] Change connection status checking interval to 10s CURA-7437 --- cura/API/ConnectionStatus.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/API/ConnectionStatus.py b/cura/API/ConnectionStatus.py index 0dbe6a4293..332e519ca9 100644 --- a/cura/API/ConnectionStatus.py +++ b/cura/API/ConnectionStatus.py @@ -10,7 +10,7 @@ from cura.UltimakerCloud import UltimakerCloudAuthentication class ConnectionStatus(QObject): """Status info for some web services""" - UPDATE_INTERVAL = 5.0 # seconds + UPDATE_INTERVAL = 10.0 # seconds ULTIMAKER_CLOUD_STATUS_URL = UltimakerCloudAuthentication.CuraCloudAPIRoot + "/connect/v1/" __instance = None # type: Optional[ConnectionStatus]