mirror of
https://github.com/Serial-Studio/Serial-Studio.git
synced 2025-01-31 17:42:55 +08:00
Update MQTT config dialog
This commit is contained in:
parent
e15f423e6b
commit
f3b8e6b409
@ -46,10 +46,10 @@ FramelessWindow.CustomWindow {
|
|||||||
extraFlags: Qt.WindowStaysOnTopHint
|
extraFlags: Qt.WindowStaysOnTopHint
|
||||||
x: (Screen.desktopAvailableWidth - width) / 2
|
x: (Screen.desktopAvailableWidth - width) / 2
|
||||||
y: (Screen.desktopAvailableHeight - height) / 2
|
y: (Screen.desktopAvailableHeight - height) / 2
|
||||||
minimumHeight: 440 + titlebar.height + 2 * root.shadowMargin
|
|
||||||
maximumHeight: 440 + titlebar.height + 2 * root.shadowMargin
|
|
||||||
minimumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.shadowMargin
|
minimumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.shadowMargin
|
||||||
maximumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.shadowMargin
|
maximumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.shadowMargin
|
||||||
|
minimumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.shadowMargin
|
||||||
|
maximumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.shadowMargin
|
||||||
|
|
||||||
//
|
//
|
||||||
// Titlebar options
|
// Titlebar options
|
||||||
@ -469,14 +469,10 @@ FramelessWindow.CustomWindow {
|
|||||||
opacity: enabled ? 1 : 0.5
|
opacity: enabled ? 1 : 0.5
|
||||||
enabled: !Cpp_MQTT_Client.isConnectedToHost
|
enabled: !Cpp_MQTT_Client.isConnectedToHost
|
||||||
Behavior on opacity {NumberAnimation{}}
|
Behavior on opacity {NumberAnimation{}}
|
||||||
} Item {
|
|
||||||
visible: !(_ssl.checked)
|
|
||||||
Layout.fillWidth: true
|
|
||||||
} Label {
|
} Label {
|
||||||
visible: _ssl.checked
|
|
||||||
text: qsTr("Certificate:")
|
text: qsTr("Certificate:")
|
||||||
opacity: enabled ? 1 : 0.5
|
opacity: enabled ? 1 : 0.5
|
||||||
enabled: !Cpp_MQTT_Client.isConnectedToHosT
|
enabled: !Cpp_MQTT_Client.isConnectedToHost && _ssl.checked
|
||||||
Behavior on opacity {NumberAnimation{}}
|
Behavior on opacity {NumberAnimation{}}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -496,8 +492,6 @@ FramelessWindow.CustomWindow {
|
|||||||
//
|
//
|
||||||
RowLayout {
|
RowLayout {
|
||||||
spacing: app.spacing
|
spacing: app.spacing
|
||||||
enabled: _ssl.checked
|
|
||||||
visible: _ssl.checked
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
ComboBox {
|
ComboBox {
|
||||||
@ -509,7 +503,7 @@ FramelessWindow.CustomWindow {
|
|||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
opacity: enabled ? 1 : 0.5
|
opacity: enabled ? 1 : 0.5
|
||||||
enabled: !Cpp_MQTT_Client.isConnectedToHost
|
enabled: !Cpp_MQTT_Client.isConnectedToHost && _ssl.checked
|
||||||
Behavior on opacity {NumberAnimation{}}
|
Behavior on opacity {NumberAnimation{}}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -520,7 +514,7 @@ FramelessWindow.CustomWindow {
|
|||||||
Layout.maximumWidth: height
|
Layout.maximumWidth: height
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
icon.source: "qrc:/icons/open.svg"
|
icon.source: "qrc:/icons/open.svg"
|
||||||
enabled: _certificateMode.currentIndex == 1
|
enabled: _certificateMode.currentIndex == 1 && _ssl.checked
|
||||||
Behavior on opacity {NumberAnimation{}}
|
Behavior on opacity {NumberAnimation{}}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -530,23 +524,19 @@ FramelessWindow.CustomWindow {
|
|||||||
//
|
//
|
||||||
Item {
|
Item {
|
||||||
height: app.spacing
|
height: app.spacing
|
||||||
visible: _ssl.checked
|
|
||||||
} Item {
|
} Item {
|
||||||
height: app.spacing
|
height: app.spacing
|
||||||
visible: _ssl.checked
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// SSL/TLS protocol selection title
|
// SSL/TLS protocol selection title
|
||||||
//
|
//
|
||||||
Item {
|
Item {
|
||||||
visible: _ssl.checked
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
} Label {
|
} Label {
|
||||||
visible: _ssl.checked
|
|
||||||
text: qsTr("Protocol:")
|
text: qsTr("Protocol:")
|
||||||
opacity: enabled ? 1 : 0.5
|
opacity: enabled ? 1 : 0.5
|
||||||
enabled: !Cpp_MQTT_Client.isConnectedToHost
|
enabled: !Cpp_MQTT_Client.isConnectedToHost && _ssl.checked
|
||||||
Behavior on opacity {NumberAnimation{}}
|
Behavior on opacity {NumberAnimation{}}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -554,15 +544,13 @@ FramelessWindow.CustomWindow {
|
|||||||
// SSL/TLS protocol selection
|
// SSL/TLS protocol selection
|
||||||
//
|
//
|
||||||
Item {
|
Item {
|
||||||
visible: _ssl.checked
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
} ComboBox {
|
} ComboBox {
|
||||||
id: _protocols
|
id: _protocols
|
||||||
visible: _ssl.checked
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
opacity: enabled ? 1 : 0.5
|
opacity: enabled ? 1 : 0.5
|
||||||
model: Cpp_MQTT_Client.sslProtocols
|
model: Cpp_MQTT_Client.sslProtocols
|
||||||
enabled: !Cpp_MQTT_Client.isConnectedToHost
|
enabled: !Cpp_MQTT_Client.isConnectedToHost && _ssl.checked
|
||||||
Behavior on opacity {NumberAnimation{}}
|
Behavior on opacity {NumberAnimation{}}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user