File tree Expand file tree Collapse file tree 2 files changed +21
-10
lines changed Expand file tree Collapse file tree 2 files changed +21
-10
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ Dialog {
120
120
121
121
contentItem: Item {
122
122
implicitWidth: 800
123
- implicitHeight: PlatformUtils . isOSX () ? 650 : 600
123
+ implicitHeight: 650
124
124
125
125
ColumnLayout {
126
126
anchors .fill : parent
@@ -143,11 +143,9 @@ Dialog {
143
143
height: settingsTabs .height
144
144
145
145
ColumnLayout {
146
- width: PlatformUtils . isOSX () ? mainSettingsScrollView .width - 20 : mainSettingsScrollView . width
146
+ width: mainSettingsScrollView .width - 20
147
147
height: children .height
148
148
149
- SettingsGroupTitle { text: qsTranslate (" RDM" ," Main Settings" ) }
150
-
151
149
GridLayout {
152
150
columns: 2
153
151
@@ -194,16 +192,11 @@ Dialog {
194
192
objectName: " rdm_connection_group_box_security"
195
193
columns: 2
196
194
197
- BetterRadioButton {
198
- text: qsTranslate (" RDM" ," None" )
199
- checked: root .settings ? ! root .settings .sslEnabled && ! root .settings .useSshTunnel () : true
200
- Layout .columnSpan : 2
201
- }
202
-
203
195
BetterRadioButton {
204
196
id: sslRadioButton
205
197
Layout .columnSpan : 2
206
198
text: qsTranslate (" RDM" ," SSL" )
199
+ allowUncheck: true
207
200
checked: root .settings ? root .settings .sslEnabled && ! root .sshEnabled : false
208
201
Component .onCompleted : root .sslEnabled = Qt .binding (function () { return sslRadioButton .checked })
209
202
onCheckedChanged: {
@@ -267,6 +260,7 @@ Dialog {
267
260
objectName: " rdm_connection_security_ssh_radio_button"
268
261
Layout .columnSpan : 2
269
262
text: qsTranslate (" RDM" ," SSH Tunnel" )
263
+ allowUncheck: true
270
264
checked: root .settings ? root .settings .useSshTunnel () : false
271
265
Component .onCompleted : root .sshEnabled = Qt .binding (function () { return sshRadioButton .checked })
272
266
onCheckedChanged: {
Original file line number Diff line number Diff line change @@ -4,6 +4,23 @@ import QtQuick.Controls 2.2
4
4
RadioButton {
5
5
id: root
6
6
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
+
7
24
indicator: Rectangle {
8
25
implicitWidth: 16
9
26
implicitHeight: 16
You can’t perform that action at this time.
0 commit comments