diff --git a/i18n/translation_de.qm b/i18n/translation_de.qm index f961acc2..135d603d 100644 Binary files a/i18n/translation_de.qm and b/i18n/translation_de.qm differ diff --git a/i18n/translation_de.ts b/i18n/translation_de.ts index 0609c946..0bee62d0 100644 --- a/i18n/translation_de.ts +++ b/i18n/translation_de.ts @@ -52,6 +52,15 @@ Titel... + + ContactList + + + paste-address-to-add-contact + ex: "... paste an address here to add a contact ..." + Adresse hier hinzufügen, um einen Kontakt aufzunehmen + + EmojiDrawer @@ -277,10 +286,9 @@ Neue Gruppe anlegen - paste-address-to-add-contact ex: "... paste an address here to add a contact ..." - Adresse hier hinzufügen, um einen Kontakt aufzunehmen + Adresse hier hinzufügen, um einen Kontakt aufzunehmen @@ -484,13 +492,18 @@ - + + password + + + + error-0-profiles-loaded-for-password 0 profiles loaded with that password - + unlock Unlock @@ -540,25 +553,25 @@ Statusbar - + network-status-disconnected Disconnected from the internet, check your connection - + network-status-attempting-tor Attempting to connect to Tor network - + network-status-connecting Connecting... - + network-status-online Online diff --git a/i18n/translation_en.qm b/i18n/translation_en.qm index 67a327df..f62ab2f5 100644 Binary files a/i18n/translation_en.qm and b/i18n/translation_en.qm differ diff --git a/i18n/translation_en.ts b/i18n/translation_en.ts index eb4d332c..f06eea6e 100644 --- a/i18n/translation_en.ts +++ b/i18n/translation_en.ts @@ -52,6 +52,15 @@ title... + + ContactList + + + paste-address-to-add-contact + ex: "... paste an address here to add a contact ..." + ... paste an address here to add a contact... + + EmojiDrawer @@ -283,10 +292,9 @@ Right-click to reset. Create new group - paste-address-to-add-contact ex: "... paste an address here to add a contact ..." - ... paste an address here to add a contact... + ... paste an address here to add a contact... @@ -502,13 +510,18 @@ Right-click to reset. 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 @@ -566,25 +579,25 @@ Right-click to reset. Statusbar - + network-status-disconnected Disconnected from the internet, check your connection Disconnected from the internet, check your connection - + network-status-attempting-tor Attempting to connect to Tor network Attempting to connect to Tor network - + network-status-connecting Connecting... Connecting to network and peers... - + network-status-online Online Online diff --git a/i18n/translation_fr.qm b/i18n/translation_fr.qm index 269741c1..7b55a58d 100644 Binary files a/i18n/translation_fr.qm and b/i18n/translation_fr.qm differ diff --git a/i18n/translation_fr.ts b/i18n/translation_fr.ts index ba33de5c..b8cd61fc 100644 --- a/i18n/translation_fr.ts +++ b/i18n/translation_fr.ts @@ -52,6 +52,15 @@ titre... + + ContactList + + + paste-address-to-add-contact + ex: "... paste an address here to add a contact ..." + ... coller une adresse ici pour ajouter un contact... + + EmojiDrawer @@ -277,10 +286,9 @@ Créer un nouveau groupe - paste-address-to-add-contact ex: "... paste an address here to add a contact ..." - ... coller une adresse ici pour ajouter un contact... + ... coller une adresse ici pour ajouter un contact... @@ -484,13 +492,18 @@ - + + password + + + + error-0-profiles-loaded-for-password 0 profiles loaded with that password - + unlock Unlock @@ -540,25 +553,25 @@ Statusbar - + network-status-disconnected Disconnected from the internet, check your connection - + network-status-attempting-tor Attempting to connect to Tor network - + network-status-connecting Connecting... - + network-status-online Online diff --git a/i18n/translation_pt.qm b/i18n/translation_pt.qm index 934c5293..a1155b51 100644 Binary files a/i18n/translation_pt.qm and b/i18n/translation_pt.qm differ diff --git a/i18n/translation_pt.ts b/i18n/translation_pt.ts index fda57ebd..df0402bd 100644 --- a/i18n/translation_pt.ts +++ b/i18n/translation_pt.ts @@ -52,6 +52,15 @@ título… + + ContactList + + + paste-address-to-add-contact + ex: "... paste an address here to add a contact ..." + … cole um endereço aqui para adicionar um contato… + + EmojiDrawer @@ -277,10 +286,9 @@ Criar novo grupo - paste-address-to-add-contact ex: "... paste an address here to add a contact ..." - … cole um endereço aqui para adicionar um contato… + … cole um endereço aqui para adicionar um contato… @@ -484,13 +492,18 @@ - + + password + + + + error-0-profiles-loaded-for-password 0 profiles loaded with that password - + unlock Unlock @@ -540,25 +553,25 @@ Statusbar - + network-status-disconnected Disconnected from the internet, check your connection - + network-status-attempting-tor Attempting to connect to Tor network - + network-status-connecting Connecting... - + network-status-online Online diff --git a/qml.qrc b/qml.qrc index 54cbc142..279eeeec 100644 --- a/qml.qrc +++ b/qml.qrc @@ -25,6 +25,7 @@ qml/widgets/ContactRow.qml qml/widgets/EmojiDrawer.qml qml/widgets/FontAwesome.qml + qml/widgets/IconTextField.qml qml/widgets/InplaceEditText.qml qml/widgets/Message.qml qml/widgets/ScalingLabel.qml @@ -36,6 +37,7 @@ qml/widgets/TextField.qml qml/widgets/Toolbar.qml qml/widgets/Statusbar.qml + qml/widgets/UnderlineTextField.qml qml/widgets/controls/Loader.qml qml/widgets/controls/Variables.qml i18n/translation_de.qm diff --git a/qml/panes/PeerSettingsPane.qml b/qml/panes/PeerSettingsPane.qml index fe753699..706468d1 100644 --- a/qml/panes/PeerSettingsPane.qml +++ b/qml/panes/PeerSettingsPane.qml @@ -46,6 +46,7 @@ ColumnLayout { // peerSettingsPane anchors.right:parent.right readOnly: true button_text: qsTr("copy-btn") + dropShadowColor: Theme.dropShadowPaneColor onClicked: { //: notification: copied to clipboard gcd.popup(qsTr("copied-to-clipboard-notification")) @@ -75,6 +76,7 @@ ColumnLayout { // peerSettingsPane anchors.left:parent.left anchors.right:parent.right button_text: qsTr("save-btn") + dropShadowColor: Theme.dropShadowPaneColor onClicked: { gcd.savePeerSettings(txtOnion.text, txtDisplayName.text) theStack.title = txtDisplayName.text diff --git a/qml/panes/ProfileManagerPane.qml b/qml/panes/ProfileManagerPane.qml index c77e2533..7deb581c 100644 --- a/qml/panes/ProfileManagerPane.qml +++ b/qml/panes/ProfileManagerPane.qml @@ -27,10 +27,13 @@ ColumnLayout { text: qsTr("enter-profile-password")+":" } - TextField { + Widgets.UnderlineTextField { id: txtPassword anchors.horizontalCenter: parent.horizontalCenter - style: CwtchTextFieldStyle{ width: thecol.width * 0.8 } + Layout.fillWidth: true + Layout.rightMargin: 40 + Layout.leftMargin: 40 + placeholderText: qsTr("password") echoMode: TextInput.Password onAccepted: button.clicked() } diff --git a/qml/theme/CwtchDark.qml b/qml/theme/CwtchDark.qml index 3f42c772..35f04424 100644 --- a/qml/theme/CwtchDark.qml +++ b/qml/theme/CwtchDark.qml @@ -12,7 +12,8 @@ ThemeType { backgroundMainColor: darkGrayPurple backgroundPaneColor: deepPurple - mainTextColor: whitePurple + mainTextColor: purple + altTextColor: mauvePurple defaultButtonColor: mauvePurple defaultButtonActiveColor: pink defaultButtonTextColor: whitePurple @@ -30,7 +31,8 @@ ThemeType { portraitContactBadgeColor: hotPink portraitContactBadgeTextColor: whitePurple portraitProfileBadgeColor: mauvePurple - dropShadowColor: darkGrayPurple + dropShadowColor: mauvePurple + dropShadowPaneColor: darkGrayPurple toggleColor: darkGrayPurple toggleOnColor: whitePurple diff --git a/qml/theme/CwtchLight.qml b/qml/theme/CwtchLight.qml index f12b31ea..aac033e4 100644 --- a/qml/theme/CwtchLight.qml +++ b/qml/theme/CwtchLight.qml @@ -13,6 +13,7 @@ ThemeType { backgroundPaneColor: softPurple mainTextColor: darkPurple + altTextColor: purple defaultButtonColor: hotPink defaultButtonActiveColor: pink defaultButtonTextColor: whitePurple @@ -31,6 +32,7 @@ ThemeType { portraitContactBadgeTextColor: whitePurple portraitProfileBadgeColor: brightPurple dropShadowColor: purple + dropShadowPaneColor: purple toggleColor: whitePurple toggleOnColor: hotPink diff --git a/qml/theme/Theme.qml b/qml/theme/Theme.qml index 53d6650e..7570b24b 100644 --- a/qml/theme/Theme.qml +++ b/qml/theme/Theme.qml @@ -7,11 +7,13 @@ Item { readonly property color backgroundPaneColor: theme.backgroundPaneColor readonly property color mainTextColor: theme.mainTextColor + readonly property color altTextColor: theme.altTextColor readonly property color defaultButtonColor: theme.defaultButtonColor readonly property color defaultButtonActiveColor: theme.defaultButtonActiveColor readonly property color defaultButtonTextColor: theme.defaultButtonTextColor readonly property color dropShadowColor: theme.dropShadowColor + readonly property color dropShadowPaneColor: theme.dropShadowPaneColor readonly property color portraitOnlineBorderColor: theme.portraitOnlineBorderColor readonly property color portraitOnlineBackgroundColor: theme.portraitOnlineBackgroundColor diff --git a/qml/theme/ThemeType.qml b/qml/theme/ThemeType.qml index a71cc84b..55dc9c2d 100644 --- a/qml/theme/ThemeType.qml +++ b/qml/theme/ThemeType.qml @@ -5,6 +5,7 @@ QtObject { property color backgroundPaneColor: "red" property color mainTextColor: "red" + property color altTextColor: "red" property color defaultButtonColor: "red" property color defaultButtonActiveColor: "red" property color defaultButtonTextColor: "red" @@ -23,6 +24,7 @@ QtObject { property color portraitContactBadgeTextColor: "red" property color portraitProfileBadgeColor: "red" property color dropShadowColor: "black" + property color dropShadowPaneColor: "black" property color toggleColor: "black" property color toggleOnColor: "black" property color toggleOffColor: "black" diff --git a/qml/widgets/ButtonTextField.qml b/qml/widgets/ButtonTextField.qml index 32cbb83e..9962ce2c 100644 --- a/qml/widgets/ButtonTextField.qml +++ b/qml/widgets/ButtonTextField.qml @@ -9,13 +9,15 @@ import "../theme" // ButtonTextField integrates a text field and a button TextField { + id: tf color: Theme.mainTextColor - font.pixelSize: 10 * gcd.themeScale + font.pixelSize: Theme.secondaryTextSize * gcd.themeScale width: parent.width - 20 property string icon property string button_text signal clicked smooth: true + property color dropShadowColor: Theme.dropShadowColor background: Rectangle { radius: 10 @@ -27,7 +29,7 @@ TextField { horizontalOffset: 4 verticalOffset: 4 samples:10 - color: Theme.dropShadowColor + color: tf.dropShadowColor } } diff --git a/qml/widgets/ContactList.qml b/qml/widgets/ContactList.qml index 881e0b93..2011784a 100644 --- a/qml/widgets/ContactList.qml +++ b/qml/widgets/ContactList.qml @@ -10,6 +10,7 @@ ColumnLayout { property alias dualPane: myprof.dualPane + spacing: 10 MouseArea { anchors.fill: parent @@ -23,6 +24,32 @@ ColumnLayout { id: myprof } + + IconTextField { + id: searchAddText + anchors.horizontalCenter: parent.horizontalCenter + + Layout.minimumWidth: parent.width - 60 + Layout.maximumWidth: parent.width - 60 + + + + + //: ex: "... paste an address here to add a contact ..." + placeholderText: qsTr("paste-address-to-add-contact") + horizontalAlignment: TextInput.AlignHCenter + icon: gcd.assetPath + "core/search-24px.svg" + + + onTextChanged: { + if (text != "") { + gcd.importString(text) + text = "" + } + } + } + + Flickable { // THE ACTUAL CONTACT LIST id: sv //Layout.alignment: Qt.AlignLeft | Qt.AlignTop @@ -37,7 +64,6 @@ ColumnLayout { boundsBehavior: Flickable.StopAtBounds maximumFlickVelocity: 400 - ScrollBar.vertical: ScrollBar { policy: ScrollBar.AsNeeded background: Rectangle { diff --git a/qml/widgets/IconTextField.qml b/qml/widgets/IconTextField.qml new file mode 100644 index 00000000..a1a80183 --- /dev/null +++ b/qml/widgets/IconTextField.qml @@ -0,0 +1,49 @@ +import QtQuick 2.7 + +import QtQuick.Controls 2.13 +import QtQuick.Controls.Styles 1.4 +import QtGraphicalEffects 1.12 +import "." as Widgets +import "../theme" + +// IconTextField integrates a text field and an icon +TextField { + color: Theme.mainTextColor + font.pixelSize: Theme.secondaryTextSize * gcd.themeScale * gcd.themeScale + width: parent.width - 20 + property alias icon: icon_.source + signal clicked + smooth: true + placeholderTextColor: Theme.altTextColor + + + background: Rectangle { + radius: 10 + color: Theme.backgroundMainColor + border.color: Theme.backgroundMainColor + layer.enabled: true + layer.effect: DropShadow { + transparentBorder: true + horizontalOffset: 0 + verticalOffset: 0 + samples: 10 + radius: 8 + color: Theme.dropShadowColor + } + } + + Widgets.Icon { + id: icon_ + + anchors.right: parent.right + anchors.rightMargin: 4 + anchors.verticalCenter: parent.verticalCenter + + height: parent.height-4; + width: parent.height-4; + + iconColor: Theme.altTextColor + backgroundColor: Theme.backgroundMainColor + } + +} diff --git a/qml/widgets/MyProfile.qml b/qml/widgets/MyProfile.qml index c0436f94..a8937bf1 100644 --- a/qml/widgets/MyProfile.qml +++ b/qml/widgets/MyProfile.qml @@ -16,8 +16,8 @@ Item { anchors.fill: parent width: parent.width - height: profile.height + searchAddText.height + 10 - implicitHeight: profile.height + searchAddText.height + 10 + height: profile.height + implicitHeight: profile.height property string image property string nick @@ -99,6 +99,7 @@ Item { id: nameRow height: name.height onWidthChanged: { name.textResize() } + color: Theme.backgroundMainColor Rectangle { id: nameCenter @@ -138,26 +139,6 @@ Item { } - - TextField { - id: searchAddText - anchors.top: profile.bottom - anchors.horizontalCenter: parent.horizontalCenter - - style: CwtchTextFieldStyle{ } - width: parent.width - 30 - //: ex: "... paste an address here to add a contact ..." - placeholderText: qsTr("paste-address-to-add-contact") - horizontalAlignment: TextInput.AlignHCenter - - onTextChanged: { - if (text != "") { - gcd.importString(text) - text = "" - } - } - } - Connections { target: gcd diff --git a/qml/widgets/ProfileList.qml b/qml/widgets/ProfileList.qml index 028304fc..0e8618ae 100644 --- a/qml/widgets/ProfileList.qml +++ b/qml/widgets/ProfileList.qml @@ -104,17 +104,19 @@ ColumnLayout { PortraitRow { handle: "" displayName: qsTr("add-new-profile-btn") + nameColor: Theme.mainTextColor image: "/fontawesome/regular/user.svg" tag: "" - portraitBorderColor: Theme.defaultButtonColor - portraitColor: Theme.defaultButtonColor + portraitBorderColor: Theme.portraitOnlineBorderColor + portraitColor: Theme.portraitOnlineBackgroundColor badgeVisible: true badgeContent: Image { source: gcd.assetPath + "/fontawesome/solid/plus.svg" height: Theme.badgeTextSize * gcd.themeScale width: height } - badgeColor: Theme.portraitOnlineBorderColor + badgeColor: Theme.defaultButtonColor + onClicked: function(handle) { profileAddEditPane.reset(); parentStack.pane = parentStack.addEditProfilePane } } } diff --git a/qml/widgets/UnderlineTextField.qml b/qml/widgets/UnderlineTextField.qml new file mode 100644 index 00000000..c5d26619 --- /dev/null +++ b/qml/widgets/UnderlineTextField.qml @@ -0,0 +1,34 @@ +import QtQuick 2.7 + +import QtQuick.Controls 2.13 +import QtQuick.Controls.Styles 1.4 +import QtGraphicalEffects 1.12 +import "." as Widgets +import "../theme" + +// UnderlineTextField is a textfield styled as just an underline +TextField { + property alias backgroundColor: bg.color + + color: Theme.mainTextColor + font.pixelSize: Theme.secondaryTextSize * gcd.themeScale * gcd.themeScale + signal clicked + smooth: true + placeholderTextColor: Theme.altTextColor + + background: Rectangle { + id: bg + anchors.fill: parent + color: Theme.backgroundMainColor + border.color: color + } + + Rectangle { + id: bottomBar + anchors.bottom: parent.bottom + anchors.left: parent.left + anchors.right: parent.right + height: 2 + color: Theme.mainTextColor + } +}