Skip to content

Commit

Permalink
Icon for macos and tiny fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pokamest committed May 27, 2023
1 parent adcc74a commit e5e8fa0
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 16 deletions.
6 changes: 5 additions & 1 deletion client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion client/ui/pages_logic/StartPageLogic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
28 changes: 15 additions & 13 deletions client/ui/qml/Pages/PageStart.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion client/ui/qml/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit e5e8fa0

Please sign in to comment.