Skip to content

Commit 15566ee

Browse files
committed
Add tip for OSX users
1 parent 0d5b79f commit 15566ee

File tree

1 file changed

+23
-11
lines changed

1 file changed

+23
-11
lines changed

src/qml/ConnectionSettignsDialog.qml

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import QtQuick.Controls 1.2
44
import QtQuick.Dialogs 1.2
55
import QtQuick.Controls.Styles 1.4
66
import "./common"
7+
import "./common/platformutils.js" as PlatformUtils
78

89
Dialog {
910
id: root
@@ -115,7 +116,7 @@ Dialog {
115116

116117
contentItem: Item {
117118
implicitWidth: 600
118-
implicitHeight: Qt.platform.os == "osx"? 600 : 675
119+
implicitHeight: PlatformUtils.isOSX()? 600 : 675
119120

120121
ColumnLayout {
121122
anchors.fill: parent
@@ -125,15 +126,15 @@ Dialog {
125126
id: settingsTabs
126127
Layout.fillWidth: true
127128
Layout.fillHeight: true
128-
Layout.minimumHeight: Qt.platform.os == "osx"? 550 : 590
129+
Layout.minimumHeight: PlatformUtils.isOSX()? 550 : 590
129130

130131
Tab {
131132
id: mainTab
132133
title: qsTr("Connection Settings")
133134

134135
ColumnLayout {
135136
anchors.fill: parent
136-
anchors.margins: Qt.platform.os == "osx"? 5 : 10
137+
anchors.margins: PlatformUtils.isOSX()? 5 : 10
137138

138139
GroupBox {
139140
title: qsTr("Main Settings")
@@ -319,16 +320,27 @@ Dialog {
319320
Layout.columnSpan: 2
320321
Layout.fillWidth: true
321322

322-
FilePathInput {
323-
id: sshPrivateKey
323+
ColumnLayout {
324324
anchors.fill: parent
325-
placeholderText: qsTr("Path to Private Key in PEM format")
326-
nameFilters: [ "Private key in PEM format (*)" ]
327-
title: qsTr("Select private key in PEM format")
328-
path: root.settings ? root.settings.sshPrivateKey : ""
329-
onPathChanged: root.settings.sshPrivateKey = path
325+
326+
FilePathInput {
327+
id: sshPrivateKey
328+
329+
Layout.fillWidth: true
330+
331+
placeholderText: qsTr("Path to Private Key in PEM format")
332+
nameFilters: [ "Private key in PEM format (*)" ]
333+
title: qsTr("Select private key in PEM format")
334+
path: root.settings ? root.settings.sshPrivateKey : ""
335+
onPathChanged: root.settings.sshPrivateKey = path
336+
}
337+
338+
Label {
339+
visible: PlatformUtils.isOSX()
340+
Layout.fillWidth: true;
341+
text: qsTr("<b>Tip:</b> Use <code>⌘ + Shift + .</code> to show hidden files and folders in dialog") }
330342
}
331-
}
343+
}
332344

333345
GroupBox {
334346
title: qsTr("Password")

0 commit comments

Comments
 (0)