Skip to content

Commit 6ee3817

Browse files
committed
Make ConnectionSettings dialog more compact to prevent overflows
1 parent 4f0d483 commit 6ee3817

File tree

2 files changed

+21
-10
lines changed

2 files changed

+21
-10
lines changed

src/qml/ConnectionSettignsDialog.qml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Dialog {
120120

121121
contentItem: Item {
122122
implicitWidth: 800
123-
implicitHeight: PlatformUtils.isOSX()? 650 : 600
123+
implicitHeight: 650
124124

125125
ColumnLayout {
126126
anchors.fill: parent
@@ -143,11 +143,9 @@ Dialog {
143143
height: settingsTabs.height
144144

145145
ColumnLayout {
146-
width: PlatformUtils.isOSX()? mainSettingsScrollView.width - 20 : mainSettingsScrollView.width
146+
width: mainSettingsScrollView.width - 20
147147
height: children.height
148148

149-
SettingsGroupTitle { text: qsTranslate("RDM","Main Settings") }
150-
151149
GridLayout {
152150
columns: 2
153151

@@ -194,16 +192,11 @@ Dialog {
194192
objectName: "rdm_connection_group_box_security"
195193
columns: 2
196194

197-
BetterRadioButton {
198-
text: qsTranslate("RDM","None")
199-
checked: root.settings ? !root.settings.sslEnabled && !root.settings.useSshTunnel() : true
200-
Layout.columnSpan: 2
201-
}
202-
203195
BetterRadioButton {
204196
id: sslRadioButton
205197
Layout.columnSpan: 2
206198
text: qsTranslate("RDM","SSL")
199+
allowUncheck: true
207200
checked: root.settings ? root.settings.sslEnabled && !root.sshEnabled : false
208201
Component.onCompleted: root.sslEnabled = Qt.binding(function() { return sslRadioButton.checked })
209202
onCheckedChanged: {
@@ -267,6 +260,7 @@ Dialog {
267260
objectName: "rdm_connection_security_ssh_radio_button"
268261
Layout.columnSpan: 2
269262
text: qsTranslate("RDM","SSH Tunnel")
263+
allowUncheck: true
270264
checked: root.settings ? root.settings.useSshTunnel() : false
271265
Component.onCompleted: root.sshEnabled = Qt.binding(function() { return sshRadioButton.checked })
272266
onCheckedChanged: {

src/qml/common/BetterRadioButton.qml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,23 @@ import QtQuick.Controls 2.2
44
RadioButton {
55
id: root
66

7+
property bool allowUncheck: false
8+
9+
property bool _uncheck: false
10+
11+
onPressed: {
12+
if (allowUncheck && checked) {
13+
_uncheck = true
14+
}
15+
}
16+
17+
onReleased: {
18+
if (_uncheck) {
19+
checked = false
20+
_uncheck = false
21+
}
22+
}
23+
724
indicator: Rectangle {
825
implicitWidth: 16
926
implicitHeight: 16

0 commit comments

Comments
 (0)