diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index fad1b67e7..1d6b3e0d2 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -214,7 +214,11 @@ if(APPLE) set(CMAKE_OSX_DEPLOYMENT_TARGET 10.15) add_compile_definitions(MVPN_MACOS) - # ICON = $$PWD/images/app.icns + + set(ICON_FILE ${CMAKE_CURRENT_SOURCE_DIR}/images/app.icns) + set(MACOSX_BUNDLE_ICON_FILE app.icns) + set_source_files_properties(${ICON_FILE} PROPERTIES MACOSX_PACKAGE_LOCATION Resources) + set(SOURCES ${SOURCES} ${ICON_FILE}) find_library(FW_COCOA Cocoa) find_library(FW_APPLICATIONSERVICES ApplicationServices) diff --git a/client/ui/pages_logic/StartPageLogic.h b/client/ui/pages_logic/StartPageLogic.h index bfca6e606..9025a052c 100644 --- a/client/ui/pages_logic/StartPageLogic.h +++ b/client/ui/pages_logic/StartPageLogic.h @@ -23,7 +23,7 @@ class StartPageLogic : public PageLogicBase AUTO_PROPERTY(QString, labelWaitInfoText) AUTO_PROPERTY(bool, pushButtonBackFromStartVisible) - AUTO_PROPERTY(QString, privateKeyPassphrase); + AUTO_PROPERTY(QString, privateKeyPassphrase) READONLY_PROPERTY(QRegularExpression, ipAddressPortRegex) public: diff --git a/client/ui/qml/Pages/PageStart.qml b/client/ui/qml/Pages/PageStart.qml index 85c63b4d4..a752817f9 100644 --- a/client/ui/qml/Pages/PageStart.qml +++ b/client/ui/qml/Pages/PageStart.qml @@ -233,9 +233,8 @@ PageBase { anchors.top: label_server_ip.bottom anchors.horizontalCenter: parent.horizontalCenter text: StartPageLogic.lineEditIpText - onEditingFinished: { - StartPageLogic.lineEditIpText = text - } + onEditingFinished: { StartPageLogic.lineEditIpText = text } + onTextEdited: { StartPageLogic.lineEditIpText = text } validator: RegularExpressionValidator { regularExpression: StartPageLogic.ipAddressPortRegex @@ -253,9 +252,8 @@ PageBase { anchors.top: label_login.bottom anchors.horizontalCenter: parent.horizontalCenter text: StartPageLogic.lineEditLoginText - onEditingFinished: { - StartPageLogic.lineEditLoginText = text - } + onEditingFinished: { StartPageLogic.lineEditLoginText = text } + onTextEdited: { StartPageLogic.lineEditLoginText = text } } LabelType { @@ -268,25 +266,29 @@ PageBase { id: new_server_password anchors.top: label_new_server_password.bottom anchors.horizontalCenter: parent.horizontalCenter + + inputMethodHints: Qt.ImhSensitiveData echoMode: TextInput.Password text: StartPageLogic.lineEditPasswordText - onEditingFinished: { - StartPageLogic.lineEditPasswordText = text - } + onEditingFinished: { StartPageLogic.lineEditPasswordText = text } + onTextEdited: { StartPageLogic.lineEditPasswordText = text } + onAccepted: { StartPageLogic.onPushButtonConnect() } } TextFieldType { id: new_server_ssh_key anchors.top: label_new_server_password.bottom anchors.horizontalCenter: parent.horizontalCenter + visible: false height: 71 font.pixelSize: 10 verticalAlignment: Text.AlignTop + inputMethodHints: Qt.ImhSensitiveData + text: StartPageLogic.textEditSshKeyText - onEditingFinished: { - StartPageLogic.textEditSshKeyText = text - } - visible: false + onEditingFinished: { StartPageLogic.textEditSshKeyText = text } + onTextEdited: { StartPageLogic.textEditSshKeyText = text } + onAccepted: { StartPageLogic.onPushButtonConnect() } } LabelType { diff --git a/client/ui/qml/main.qml b/client/ui/qml/main.qml index 0c909650e..8dc5adcaa 100644 --- a/client/ui/qml/main.qml +++ b/client/ui/qml/main.qml @@ -354,7 +354,7 @@ Window { } textArea.wrapMode: cbLogWrap.checked ? TextEdit.WordWrap: TextEdit.NoWrap - Keys.onPressed: { + Keys.onPressed: function(event) { UiLogic.keyPressEvent(event.key) event.accepted = true }