mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Add connection status message
CURA-7437
This commit is contained in:
parent
de5c6f9318
commit
4d5ef91c43
1 changed files with 13 additions and 5 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue