From 31abd0020e77d7fe10b01ef1947e5e95f896f9c4 Mon Sep 17 00:00:00 2001 From: Dan Ballard Date: Thu, 3 Sep 2020 15:42:46 -0700 Subject: [PATCH] profile manager quick pass to be less hideous --- i18n/translation_de.qm | Bin 3050 -> 3258 bytes i18n/translation_de.ts | 59 ++-- i18n/translation_en.qm | Bin 7469 -> 7649 bytes i18n/translation_en.ts | 59 ++-- i18n/translation_fr.qm | Bin 2970 -> 3170 bytes i18n/translation_fr.ts | 59 ++-- i18n/translation_pt.qm | Bin 2844 -> 3004 bytes i18n/translation_pt.ts | 59 ++-- qml/main.qml | 2 +- qml/panes/ProfileAddEditPane.qml | 467 +++++++++++++++++-------------- qml/panes/ProfileManagerPane.qml | 66 +++-- qml/widgets/ProfileList.qml | 2 +- qml/widgets/ProfileRow.qml | 18 +- 13 files changed, 452 insertions(+), 339 deletions(-) diff --git a/i18n/translation_de.qm b/i18n/translation_de.qm index d3f984f6c3eb9adb4f9106512df8b9373c52e452..4e70a9993d8a916ccd9aff26196c503ec73b7fb7 100644 GIT binary patch delta 119 zcmaDQzDsg~2&2G6(J(D;KeifsJ_ZJ+Z4jE%6+&}eWBa}rD9&*VLUV;qY|Ufh7M=K2 xnTfk|vlL?_*W@RhnZiN=Mfqu&IjN2*DXuA*B>{+qwAPtM|Q005S5Bf9_q delta 60 zcmdlb`AU3(2qVKp(J(2lKDHWrJ_ZJ+Z4jE%mF@dpAfMyd#Ho2qT%nU$8I_s1PHxs> LjO3c^%u@~k*s>3T diff --git a/i18n/translation_de.ts b/i18n/translation_de.ts index d978b4a6..a5ba8fca 100644 --- a/i18n/translation_de.ts +++ b/i18n/translation_de.ts @@ -184,7 +184,7 @@ peer-blocked-message - Peer is blockced + Peer is blocked @@ -313,103 +313,114 @@ ProfileAddEditPane - - + + default-profile-name default suggested profile name - + profile-onion-label Onion - + + copy-btn + Kopieren + + + + copied-to-clipboard-notification + notification: copied to clipboard + in die Zwischenablage kopiert + + + profile-name Display name - + radio-use-password Password - + radio-no-password Unencrypted (No password) - + no-password-warning Not using a password on this account means that all data stored locally will not be encrypted - + current-password-label Current Password - + password1-label Password - + password2-label Reenter password - + create-profile-btn Create Profile || Save Profile - + save-profile-btn - + password-error-match Passwords do not match - + password-change-error Error changing password: Supplied password rejected - + delete-profile-btn Delete Profile - + delete-confirm-label Type DELETE to confirm - + delete-profile-confirm-btn Really Delete Profile - + delete-confirm-text DELETE @@ -418,7 +429,7 @@ ProfileList - + add-new-profile-btn @@ -426,24 +437,24 @@ ProfileManagerPane - + enter-profile-password Please enter password: - + password - + error-0-profiles-loaded-for-password 0 profiles loaded with that password - + unlock Unlock diff --git a/i18n/translation_en.qm b/i18n/translation_en.qm index e1871aa5cc5214dd2159b9f495d2edbf8bc99285..abbf18b73d1f2ec93f3b3de61b6a72c9362f0c69 100644 GIT binary patch delta 460 zcmZ2$_0W2P2xG@YQ9UOKTgEloR~Q)h!x-0I)?r{^u4g>);v55mNE?%h5Kvsyjw!+= zoPj~|Hq+!AYZw@W9hkMVmNGC%{bX)o^JZX>*f6nGzy2%hynuNO3|wlg7t7B81xwj# z?D-fNm<~f|uFDXb_aNK%y+CoU3<%8|!k(Q5RL|$jK3z1Afq~P7eXCaq(C{$!qo%VN z7{mnF-z=|XU=ZKPAtfUMbkuc@2*D#j^B;3$h^zzh%{jWcg@ER<7jmq6_yp+Mi<5O3 z<&4CwIhzFD0rfEh>90U@PI5Mhs{r}MoR{AK#aS+KzFq<3vu@yGJ|_tDoaE$MMmZ^= zNUm*OKw~*KbDiP>`jziJ*Y}-3Q-xb5Z)H?dl8oSfB6I}Eea9nm{S5;HLl=Z*Hsuj3 zPy*WGIr%T6xZx+BgMWa266@pTFWv_X*pIxv(_Mjf|KaUk_?&@3Acl8c0x$qM{CF?l zX9ZfaYO*VnzT6MKvkm8fs^{?YJa%GW5Deg7ljg&~AT&RdfkE10^CYGS-pT)XLMNLE TNleb2I`YbgVRR48)`n>Pc41kc1){rW)Gc>(hn7`W6}FP5KSU=Y8^ zR%6e{z`%4ELUUba`@R>*=gMHuP6NvGu4JDsn#aJv>B7F%s|0BHCibJIvl$pfbJ*W3 zuLbJo<&csQ0a|X%5g~X4Xo)>XhR8agqb757a|m8J3q6>8lu=DdVhi^Zp(8-6y?8{fzhPit=z`G9raWQ= zNqqOW-Qi}x`w@cZ)mPIm=*B!ahl;d3B=2k*KBV5o8U@m{{q z3bcf6awwC&TnOLUhI2sP4}PA}sj@RZGqm?C&L&l7Ow1pxi` Bbv*z8 diff --git a/i18n/translation_en.ts b/i18n/translation_en.ts index a62f2a31..4f3deba3 100644 --- a/i18n/translation_en.ts +++ b/i18n/translation_en.ts @@ -264,7 +264,7 @@ Right-click to reset. peer-blocked-message - Peer is blockced + Peer is blocked Peer is blocked @@ -405,103 +405,114 @@ Right-click to reset. Edit Profile - + profile-name Display name Display name - - + + default-profile-name default suggested profile name Alice - + profile-onion-label Onion Onion - + + copy-btn + Copy + + + + copied-to-clipboard-notification + notification: copied to clipboard + Copied to Clipboard + + + radio-use-password Password Password - + radio-no-password Unencrypted (No password) Unencrypted (No password) - + no-password-warning Not using a password on this account means that all data stored locally will not be encrypted Not using a password on this account means that all data stored locally will not be encrypted - + current-password-label Current Password Current Password - + password1-label Password Password - + password2-label Reenter password Reenter password - + create-profile-btn Create Profile || Save Profile Create Profile - + save-profile-btn Save Profile - + password-error-match Passwords do not match Passwords do not match - + password-change-error Error changing password: Supplied password rejected Error changing password: Supplied password rejected - + delete-profile-btn Delete Profile Delete Profile - + delete-confirm-label Type DELETE to confirm Type DELETE to confirm - + delete-profile-confirm-btn Really Delete Profile Really Delete Profile - + delete-confirm-text DELETE DELETE @@ -510,7 +521,7 @@ Right-click to reset. ProfileList - + add-new-profile-btn Add new profile @@ -518,24 +529,24 @@ Right-click to reset. ProfileManagerPane - + enter-profile-password Please enter password: Please enter password - + password Password - + error-0-profiles-loaded-for-password 0 profiles loaded with that password 0 profiles loaded with that password - + unlock Unlock Unlock diff --git a/i18n/translation_fr.qm b/i18n/translation_fr.qm index d20f24f0333859483ad29804708d96137192a80f..18e4d8b3fd91435da6d328986e31ec817614e5e7 100644 GIT binary patch delta 113 zcmbOw{zzhi2&2G6(QwUgY&G_L3=B-$AT%dCgyw2s`@R<_&d~#*xtJ%m<}>b|_*I#S o+i-O#3Z peer-blocked-message - Peer is blockced + Peer is blocked @@ -313,103 +313,114 @@ ProfileAddEditPane - - + + default-profile-name default suggested profile name - + profile-onion-label Onion - + + copy-btn + Copier + + + + copied-to-clipboard-notification + notification: copied to clipboard + CopiƩ dans le presse-papier + + + profile-name Display name - + radio-use-password Password - + radio-no-password Unencrypted (No password) - + no-password-warning Not using a password on this account means that all data stored locally will not be encrypted - + current-password-label Current Password - + password1-label Password - + password2-label Reenter password - + create-profile-btn Create Profile || Save Profile - + save-profile-btn - + password-error-match Passwords do not match - + password-change-error Error changing password: Supplied password rejected - + delete-profile-btn Delete Profile - + delete-confirm-label Type DELETE to confirm - + delete-profile-confirm-btn Really Delete Profile - + delete-confirm-text DELETE @@ -418,7 +429,7 @@ ProfileList - + add-new-profile-btn @@ -426,24 +437,24 @@ ProfileManagerPane - + enter-profile-password Please enter password: - + password - + error-0-profiles-loaded-for-password 0 profiles loaded with that password - + unlock Unlock diff --git a/i18n/translation_pt.qm b/i18n/translation_pt.qm index 3480551addc526c818dcd04f9b963bc556bef0aa..a64ae3c57ba4483cab59cf3026bebce749cad26d 100644 GIT binary patch delta 115 zcmbOuwnuz|2&2G6(J(D8AGR8MJ_ZJ+B@mjU5<+ucVf(%pD9)hcsx9SpH4Tpa+ZtsvC^ delta 60 zcmdlZK1XbV2qVKp(J(2_J#01hd<+asOCU5yCENGCKt6}s#Ho2qob{7g8I_qhe{a@e LZ04M7%Uuru$*T`# diff --git a/i18n/translation_pt.ts b/i18n/translation_pt.ts index 36119bb0..627dd4fd 100644 --- a/i18n/translation_pt.ts +++ b/i18n/translation_pt.ts @@ -184,7 +184,7 @@ peer-blocked-message - Peer is blockced + Peer is blocked @@ -313,103 +313,114 @@ ProfileAddEditPane - - + + default-profile-name default suggested profile name - + profile-onion-label Onion - + + copy-btn + Copiar + + + + copied-to-clipboard-notification + notification: copied to clipboard + Copiado + + + profile-name Display name - + radio-use-password Password - + radio-no-password Unencrypted (No password) - + no-password-warning Not using a password on this account means that all data stored locally will not be encrypted - + current-password-label Current Password - + password1-label Password - + password2-label Reenter password - + create-profile-btn Create Profile || Save Profile - + save-profile-btn - + password-error-match Passwords do not match - + password-change-error Error changing password: Supplied password rejected - + delete-profile-btn Delete Profile - + delete-confirm-label Type DELETE to confirm - + delete-profile-confirm-btn Really Delete Profile - + delete-confirm-text DELETE @@ -418,7 +429,7 @@ ProfileList - + add-new-profile-btn @@ -426,24 +437,24 @@ ProfileManagerPane - + enter-profile-password Please enter password: - + password - + error-0-profiles-loaded-for-password 0 profiles loaded with that password - + unlock Unlock diff --git a/qml/main.qml b/qml/main.qml index 319c4602..2073204a 100644 --- a/qml/main.qml +++ b/qml/main.qml @@ -155,7 +155,7 @@ ApplicationWindow { Rectangle { // Profile Add / Edit pane Layout.fillHeight: true Layout.fillWidth: true - color: Theme.backgroundMainColor + color: Theme.backgroundPaneColor ProfileAddEditPane{ diff --git a/qml/panes/ProfileAddEditPane.qml b/qml/panes/ProfileAddEditPane.qml index 3f1154e8..7b9535cc 100644 --- a/qml/panes/ProfileAddEditPane.qml +++ b/qml/panes/ProfileAddEditPane.qml @@ -7,9 +7,10 @@ import QtQuick.Window 2.11 import "../opaque" as Opaque +import "../opaque/theme" // import "../styles" -ColumnLayout { // Add Profile Pane +Opaque.SettingsList { // Add Profile Pane id: profileAddEditPane anchors.fill: parent @@ -55,241 +56,277 @@ ColumnLayout { // Add Profile Pane } - Flickable { - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - boundsBehavior: Flickable.StopAtBounds - clip:true - contentWidth: tehcol.width - contentHeight: tehcol.height + settings: Column { + anchors.horizontalCenter: parent.horizontalCenter + width: 700 - Column { - id: tehcol - leftPadding: 10 - spacing: 5 - width: profileAddEditPane.width - Opaque.ScalingLabel { - //: Onion - text: qsTr("profile-onion-label") + ":" - visible: mode == "edit" - } - Opaque.ScalingLabel { + Opaque.Setting { + inline: false + visible: mode == "edit" + + //: Onion + label: qsTr("profile-onion-label") + ":" + + field: Opaque.ButtonTextField { id: onionLabel - visible: mode == "edit" - } - - Opaque.ScalingLabel { - //: Display name - text: qsTr("profile-name") + ":" - } - - Opaque.TextField { - id: txtProfileName - Layout.fillWidth: true - //style: CwtchTextFieldStyle{ width: tehcol.width * 0.8 } - //: default suggested profile name - text: qsTr("default-profile-name") - - - } - - RowLayout { - //id: radioButtons - - Opaque.RadioButton { - id: radioUsePassword - checked: true - //: Password - text: qsTr("radio-use-password") - visible: mode == "add" || tag == "v1-defaultPassword" - onClicked: { - changingPassword = true - } - } - - Opaque.RadioButton { - id: radioNoPassword - //: Unencrypted (No password) - text: qsTr("radio-no-password") - visible: mode == "add" || tag == "v1-defaultPassword" - onClicked: { - changingPassword = true - } - } - } - - Opaque.ScalingLabel { - id: noPasswordLabel - //: Not using a password on this account means that all data stored locally will not be encrypted - text: qsTr("no-password-warning") - visible: radioNoPassword.checked - } - - Opaque.ScalingLabel { - id: currentPasswordLabel - //: Current Password - text: qsTr("current-password-label") + ":" - visible: radioUsePassword.checked && mode == "edit" && tag != "v1-defaultPassword" - } - - Opaque.TextField { - id: txtCurrentPassword - Layout.fillWidth: true - echoMode: TextInput.Password - visible: radioUsePassword.checked && mode == "edit" && tag != "v1-defaultPassword" - } - - Opaque.ScalingLabel { - id: passwordLabel - //: Password - text: qsTr("password1-label") + ":" - visible: radioUsePassword.checked - } - - Opaque.TextField { - id: txtPassword1 - Layout.fillWidth: true - //style: CwtchTextFieldStyle{ width: tehcol.width * 0.8 } - echoMode: TextInput.Password - visible: radioUsePassword.checked - - onTextEdited: { - changingPassword = true - } - } - - - Opaque.ScalingLabel { - id: passwordReLabel - //: Reenter password - text: qsTr("password2-label") + ":" - visible: radioUsePassword.checked - } - - Opaque.TextField { - id: txtPassword2 - Layout.fillWidth: true - //style: CwtchTextFieldStyle{ width: tehcol.width * 0.8 } - echoMode: TextInput.Password - visible: radioUsePassword.checked - } - - Opaque.Button { // ADD or SAVE button - //: Create Profile || Save Profile - text: mode == "add" ? qsTr("create-profile-btn") : qsTr("save-profile-btn") - + readOnly: true + button_text: qsTr("copy-btn") + dropShadowColor: Theme.dropShadowPaneColor onClicked: { - if (mode == "add") { - if (txtPassword1.text != txtPassword2.text) { - passwordErrorLabel.visible = true - } else { - gcd.createProfile(txtProfileName.text, radioNoPassword.checked, txtPassword1.text) - gcd.reloadProfileList() - parentStack.pane = parentStack.managementPane - } - } else { - gcd.updateNick(onion, txtProfileName.text) + //: notification: copied to clipboard + gcd.popup(qsTr("copied-to-clipboard-notification")) + onionLabel.selectAll() + onionLabel.copy() + }} + } - if (changingPassword) { + + + Opaque.Setting { + inline: false + visible: mode == "edit" + + //: Display name + label: qsTr("profile-name") + ":" + + field: Opaque.UnderlineTextField { + id: txtProfileName + //Layout.fillWidth: true + + //: default suggested profile name + text: qsTr("default-profile-name") + width: parent.width + } + } + + + Opaque.Setting { + inline: false + visible: mode == "add" || tag == "v1-defaultPassword" + + field: + ColumnLayout{ + RowLayout { + //id: radioButtons + + Opaque.RadioButton { + id: radioUsePassword + checked: true + //: Password + text: qsTr("radio-use-password") + + onClicked: { + changingPassword = true + } + } + + Opaque.RadioButton { + id: radioNoPassword + //: Unencrypted (No password) + text: qsTr("radio-no-password") + onClicked: { + changingPassword = true + } + } + } + + Opaque.ScalingLabel { + id: noPasswordLabel + //: Not using a password on this account means that all data stored locally will not be encrypted + text: qsTr("no-password-warning") + visible: radioNoPassword.checked + } + } + } + + Opaque.Setting{ + inline: false + visible: radioUsePassword.checked && mode == "edit" && tag != "v1-defaultPassword" + + + //: Current Password + label: qsTr("current-password-label") + ":" + + field: Opaque.TextField { + id: txtCurrentPassword + Layout.fillWidth: true + echoMode: TextInput.Password + + } + + } + + + Opaque.Setting { + visible: radioUsePassword.checked + + //: Password + label: qsTr("password1-label") + ":" + + field: Opaque.TextField { + id: txtPassword1 + Layout.fillWidth: true + //style: CwtchTextFieldStyle{ width: tehcol.width * 0.8 } + echoMode: TextInput.Password + visible: radioUsePassword.checked + + onTextEdited: { + changingPassword = true + } + } + + } + + Opaque.Setting { + visible: radioUsePassword.checked + + //: Reenter password + label: qsTr("password2-label") + ":" + + field: Opaque.TextField { + id: txtPassword2 + Layout.fillWidth: true + //style: CwtchTextFieldStyle{ width: tehcol.width * 0.8 } + echoMode: TextInput.Password + visible: radioUsePassword.checked + } + + } + + + Column { + width:parent.width * 0.95 + anchors.horizontalCenter: parent.horizontalCenter + spacing: 10 * gcd.themeScale + + Opaque.Button { // ADD or SAVE button + anchors.right: parent.right + height: Theme.primaryTextSize * 1.5 + + //: Create Profile || Save Profile + text: mode == "add" ? qsTr("create-profile-btn") : qsTr("save-profile-btn") + + onClicked: { + if (mode == "add") { if (txtPassword1.text != txtPassword2.text) { passwordErrorLabel.visible = true } else { - gcd.changePassword(onion, txtCurrentPassword.text, txtPassword1.text, radioNoPassword.checked) + gcd.createProfile(txtProfileName.text, radioNoPassword.checked, txtPassword1.text) + gcd.reloadProfileList() + parentStack.pane = parentStack.managementPane } } else { + gcd.updateNick(onion, txtProfileName.text) + + if (changingPassword) { + if (txtPassword1.text != txtPassword2.text) { + passwordErrorLabel.visible = true + } else { + gcd.changePassword(onion, txtCurrentPassword.text, txtPassword1.text, radioNoPassword.checked) + } + } else { + gcd.reloadProfileList() + parentStack.pane = parentStack.managementPane + } + } + + } + } + + Opaque.ScalingLabel { + id: passwordErrorLabel + //: Passwords do not match + text: qsTr("password-error-match") + visible: false + color: "red" + } + + Opaque.ScalingLabel { + id: passwordChangeErrorLabel + //: Error changing password: Supplied password rejected + text: qsTr("password-change-error") + visible: false + color: "red" + } + + + + + // ***** Delete button and confirm flow ***** + + + + + + Opaque.Button { + anchors.right: parent.right + + //: Delete Profile + text: qsTr("delete-profile-btn") + icon: "regular/trash-alt" + visible: mode == "edit" + height: Theme.primaryTextSize * 1.5 + + + onClicked: { + deleting = true + } + } + + Opaque.ScalingLabel { + id: deleteConfirmLabel + //: Type DELETE to confirm + text: qsTr("delete-confirm-label")+ ":" + visible: deleting + } + + Opaque.TextField { + id: confirmDeleteTxt + Layout.fillWidth: true + //style: CwtchTextFieldStyle{ width: tehcol.width * 0.8 } + visible: deleting + } + + Opaque.Button { + id: confirmDeleteBtn + icon: "regular/trash-alt" + + //: Really Delete Profile + text: qsTr("delete-profile-confirm-btn") + color: "red" + visible: deleting + + onClicked: { + //: DELETE + if (confirmDeleteTxt.text == qsTr("delete-confirm-text")) { + deleteConfirmLabel.color = "black" + gcd.deleteProfile(onion) gcd.reloadProfileList() parentStack.pane = parentStack.managementPane + } else { + deleteConfirmLabel.color = "red" } + } - - } - } - - Opaque.ScalingLabel { - id: passwordErrorLabel - //: Passwords do not match - text: qsTr("password-error-match") - visible: false - color: "red" - } - - Opaque.ScalingLabel { - id: passwordChangeErrorLabel - //: Error changing password: Supplied password rejected - text: qsTr("password-change-error") - visible: false - color: "red" - } - - // ***** Delete button and confirm flow ***** - - Opaque.Button { - //: Delete Profile - text: qsTr("delete-profile-btn") - icon: "regular/trash-alt" - visible: mode == "edit" - - - onClicked: { - deleting = true - } - } - - Opaque.ScalingLabel { - id: deleteConfirmLabel - //: Type DELETE to confirm - text: qsTr("delete-confirm-label")+ ":" - visible: deleting - } - - Opaque.TextField { - id: confirmDeleteTxt - Layout.fillWidth: true - //style: CwtchTextFieldStyle{ width: tehcol.width * 0.8 } - visible: deleting - } - - Opaque.Button { - id: confirmDeleteBtn - icon: "regular/trash-alt" - - //: Really Delete Profile - text: qsTr("delete-profile-confirm-btn") - color: "red" - visible: deleting - - onClicked: { - //: DELETE - if (confirmDeleteTxt.text == qsTr("delete-confirm-text")) { - deleteConfirmLabel.color = "black" - gcd.deleteProfile(onion) - gcd.reloadProfileList() - parentStack.pane = parentStack.managementPane - } else { - deleteConfirmLabel.color = "red" - } - } } - }//end of column with padding - }//end of flickable + }//end of column - Connections { // UPDATE UNREAD MESSAGES COUNTER - target: gcd - onChangePasswordResponse: function(error) { - if (!error) { - gcd.reloadProfileList() - parentStack.pane = parentStack.managementPane - } else { - passwordChangeErrorLabel.visible = true + Connections { // UPDATE UNREAD MESSAGES COUNTER + target: gcd + + onChangePasswordResponse: function(error) { + if (!error) { + gcd.reloadProfileList() + parentStack.pane = parentStack.managementPane + } else { + passwordChangeErrorLabel.visible = true + } } } } -} diff --git a/qml/panes/ProfileManagerPane.qml b/qml/panes/ProfileManagerPane.qml index 9447004a..0c0375cb 100644 --- a/qml/panes/ProfileManagerPane.qml +++ b/qml/panes/ProfileManagerPane.qml @@ -14,6 +14,7 @@ import "../opaque" as Opaque import "../opaque/controls" import "../opaque/styles" import "../opaque/theme" +import "../opaque/fonts" ColumnLayout { @@ -25,19 +26,53 @@ ColumnLayout { Opaque.ScalingLabel { anchors.horizontalCenter: parent.horizontalCenter wrapMode: TextEdit.Wrap + size: Theme.primaryTextSize + + + font.family: Fonts.applicationFontRegular.name + font.styleName: "Bold" + //: Please enter password: text: qsTr("enter-profile-password")+":" } - Opaque.UnderlineTextField { - id: txtPassword - anchors.horizontalCenter: parent.horizontalCenter - Layout.fillWidth: true - Layout.rightMargin: 40 - Layout.leftMargin: 40 - placeholderText: qsTr("password") - echoMode: TextInput.Password - onAccepted: button.clicked() + RowLayout { + width: 700 * gcd.themeScale + Layout.alignment: Qt.AlignHCenter + + Opaque.UnderlineTextField { + id: txtPassword + //anchors.horizontalCenter: parent.horizontalCenter + //Layout.fillWidth: true + Layout.maximumWidth: 450 * gcd.themeScale + Layout.minimumWidth: 450 * gcd.themeScale + + Layout.rightMargin: 40 + Layout.leftMargin: 40 + placeholderText: qsTr("password") + echoMode: TextInput.Password + onAccepted: button.clicked() + } + + Opaque.Button { + id: "button" + //anchors.horizontalCenter: parent.horizontalCenter + + width: 100 * gcd.themeScale + + icon: "solid/unlock-alt" + //: Unlock + text: qsTr("unlock") + + height: Theme.primaryTextSize * gcd.themeScale + + + onClicked: { + gcd.unlockProfiles(txtPassword.text) + txtPassword.text = "" + error.visible = false + } + } } Opaque.ScalingLabel { @@ -49,20 +84,7 @@ ColumnLayout { visible: false } - Opaque.Button { - id: "button" - anchors.horizontalCenter: parent.horizontalCenter - icon: "solid/unlock-alt" - //: Unlock - text: qsTr("unlock") - - onClicked: { - gcd.unlockProfiles(txtPassword.text) - txtPassword.text = "" - error.visible = false - } - } Connections { // ADD/REMOVE CONTACT ENTRIES target: gcd diff --git a/qml/widgets/ProfileList.qml b/qml/widgets/ProfileList.qml index 624a53e9..5d50ea44 100644 --- a/qml/widgets/ProfileList.qml +++ b/qml/widgets/ProfileList.qml @@ -97,7 +97,7 @@ ColumnLayout { } Opaque.PortraitRow { - Layout.fillWidth: true + Layout.fillWidth: true handle: "" displayName: qsTr("add-new-profile-btn") nameColor: Theme.mainTextColor diff --git a/qml/widgets/ProfileRow.qml b/qml/widgets/ProfileRow.qml index 03fd71db..669d71a0 100644 --- a/qml/widgets/ProfileRow.qml +++ b/qml/widgets/ProfileRow.qml @@ -12,6 +12,7 @@ import "../opaque/styles" import "../opaque/theme" Opaque.PortraitRow { + id: root badgeColor: Theme.portraitProfileBadgeColor portraitBorderColor: Theme.portraitOnlineBorderColor @@ -26,9 +27,12 @@ Opaque.PortraitRow { width: height } - Opaque.Button {// Edit BUTTON + Opaque.Icon {// Edit BUTTON id: btnEdit - icon: "solid/user-edit" + source: gcd.assetPath + "core/edit-24px.svg" + + backgroundColor: root.color + iconColor: Theme.altTextColor anchors.right: parent.right @@ -36,14 +40,20 @@ Opaque.PortraitRow { anchors.verticalCenter: parent.verticalCenter anchors.leftMargin: 1 * gcd.themeScale anchors.rightMargin: 20 * gcd.themeScale - height: parent.height * 0.75 - + height: parent.height * 0.5 + width: parent.height * 0.5 + size: parent.height * 0.5 onClicked: { profileAddEditPane.load(handle, displayName, tag) parentStack.pane = parentStack.addEditProfilePane } + + onHover: function (hover) { + root.isHover = hover + } + } onClicked: function openClick(handle) {