From d0d8d4bd3bc2ac52dab7228aaa721bed7805c870 Mon Sep 17 00:00:00 2001 From: Dan Ballard Date: Thu, 14 May 2020 11:04:17 -0700 Subject: [PATCH] add IconTextField for contact list search textfield and UnderlineTextField for profile manager password (and further profile pane uses) --- i18n/translation_de.qm | Bin 3948 -> 3950 bytes i18n/translation_de.ts | 29 ++++++++++++----- i18n/translation_en.qm | Bin 8501 -> 8574 bytes i18n/translation_en.ts | 29 ++++++++++++----- i18n/translation_fr.qm | Bin 3916 -> 3918 bytes i18n/translation_fr.ts | 29 ++++++++++++----- i18n/translation_pt.qm | Bin 3706 -> 3708 bytes i18n/translation_pt.ts | 29 ++++++++++++----- qml.qrc | 2 ++ qml/panes/PeerSettingsPane.qml | 2 ++ qml/panes/ProfileManagerPane.qml | 7 +++-- qml/theme/CwtchDark.qml | 6 ++-- qml/theme/CwtchLight.qml | 2 ++ qml/theme/Theme.qml | 2 ++ qml/theme/ThemeType.qml | 2 ++ qml/widgets/ButtonTextField.qml | 6 ++-- qml/widgets/ContactList.qml | 28 ++++++++++++++++- qml/widgets/IconTextField.qml | 49 +++++++++++++++++++++++++++++ qml/widgets/MyProfile.qml | 25 ++------------- qml/widgets/ProfileList.qml | 8 +++-- qml/widgets/UnderlineTextField.qml | 34 ++++++++++++++++++++ 21 files changed, 225 insertions(+), 64 deletions(-) create mode 100644 qml/widgets/IconTextField.qml create mode 100644 qml/widgets/UnderlineTextField.qml diff --git a/i18n/translation_de.qm b/i18n/translation_de.qm index f961acc2dc39300178d230fa40fa94556503a50c..135d603dbc28c0d82b14edd5c98f78e39b970c07 100644 GIT binary patch delta 350 zcmaDO_fBqtbUh0jgIC@i1_s_RhJ`kD3=GW27}-wzVPN2x#Hh1-4FdyX1moJvIzaI{ z#;wdT3=Ev=%qzdtFfed+Fu!3d0?MCe+4ls*80c_cV@?05t; zXdV|&`c$9=_FQH&fezw6$hD=e59q+>T-&_X0Syx7`c?NAsLp~rrP~20Zo^&tAqQw) z4foaTBMb~Y;XESO-vIS@L1< zfev}iXA>3zR46dnmQkGTaV7%;AMfTUMiHjT^Es#Ta69Mcl_VyY_+%EBOrFQ1GkH0S Q_~tdtpIJ9Mb7`^y0NWm7-~a#s delta 343 zcmaDS_eO4lbUkwdgIC@i1_s^`hJ`kD3=GT)jBF?VFfg#cVbs~ZhJk@Gf^qF-9R>!b z8;o0-V;C4XRhd_QsbOH?YGZ!GRs@tk&9d(akk4=tLbI^5d_H!Lfq~VF^=9-vyzWdUzI11?p$=1JNo#1Dkjb{sFp_=K*hGH_!oGZoF4L z?*a{U<+BM30b1lZ*_Kh9?O`SZ10VP1C`J*c$xC_EH(RrCu}#inp32GTTNzN4pO%@k J*`7Titel... + + 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 67a327dfef290995b15edda03763df109b082446..f62ab2f5e5519b9bc344790f11fd05fc66e7c722 100644 GIT binary patch delta 742 zcmX9+ZAepL6h8NB_wL@i-F>QUGm3%=7e+OIsf9_|kje~=ip2aV(~R0Ei{S)+6fVEG zScV{23KlBiS}m%Pq&CH@SY~Qc*`g05MoCtvbz;As_wbzeoacGo*O#`G)?je^A!e!! zfX@Sa`5OSs253vJ#CjE>2rdAq&k@%9T>wN5(UtHLK;J-ghpYg~3BpGmLVlJAejWvg zdqi&5A-}AG+@GEc5T8L7$wmNz-De-^dJhq5#3lyf`}oZZOv}V}b9uAfVWh z;lsu=3fC4jI*gB^HdQhI5Nl0{EiE1a&|P4!7|Q`92itP786ACOeRd~0e#{QoT2P3c zGg%CngqAyI=)q)8aUMYjpbBv}--nSGxL|53ChY%@ZUF6~((j)^*u3~iB9=@wM6Cg(BZ&%h~2)358W-JEu{|5p{CTK77hw z@(D6_d#`%PIg0E?_0uXu{VPfQkOp9^k)&MAkLr}Fh(i1b{ZiEKg!EG_|Jv zkzV>1uzp2XQZ2>j7|qBsV3=cKAGrV~n{mZV0_J9>XCjvJyBH6b2PmJJk&k0QxR>2- zqWtO;Y;IZ(5T#|0I70z#IqQ5){i~|k2i0c*k>z5J-vrjI=W2S=06X)GYyLC?a96q8 zKWc!GOm0C_L4F6EhD3ns(khPjz?^L@Ael+ByJ4*!b_mBt$-QOLLXpi&|V5H1=MnFN7H4h%hY<(t7zlX+9wGeBt$1hL|VuR zRXk?tC1=V+hu%a^CW|8}DMY+3h{iv<{{C4zDYi@U(KgyBS&E!8lhPq6v7Ib4x+GU& z1`yUN-K%XTt9zyU=`>KCk)BDEH*b^{AI{T;1Jdu>zcgp9zQD1Qh;HdC10{gGsP7K2 zKxDn%Upz#@uIT4Ygy9=x%hUq#oguW-LtK*M_TQ!3H_F%Ah)5g^qOn}|1j0$c7WwhA zkMc%?TImHWn+^F6+9bqmaCCj3_<~{Ly+F>)8vJ|T(S|-HDf<8kj!^Q9)W?WQ{+%yG z2&FNV`qVyUv}%m%w<*te)X~E{smgOUAhbzUbI3~0q}DM7bo;Gp(19uSr{biWI@Evh sF9Ei`h<;Fk`xU#wxC@17**V5H=ydx|WmS|F7L~Z`jQM(ZbksrqKh!A9aR2}S 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 269741c1a555d4886d5b3227f8e20ff0e55bb712..7b55a58d25a9a5e3bc24870022befb15f587b478 100644 GIT binary patch delta 342 zcmX>jcTR4CbUh0XgIC@i1_oX!hJ`kD3=GUC7}-wzVPN2>V$|8ahJk@GigE2_9iVs} z<5uPvp!j#@m0xNY7`O_U->?+{u-SidmuEk9?znwK>bV~K(q?bz!aW?e?Tr>!kgF)bO4tT?^Vyc zK!?2Lvk40UDioM(%P7uvG!qy|Z#PFViZD&i=bXyJ?VO)il9*iLlUZD{Ig^=ncSdf4bUkw#gIC@i1_oXUhJ`kD3=GUljBF?VFfg!RVbs~ZhJk@GigE2_9R>!b z8;o0-V;C4XzA~@;Qp3Q&mB;*stq3T8nq}V;AfMqRgl1u9`F!jg0|RRu>&5aj3=BMX z*=p?hfcga>G`A+(_q{+q*E;s;qInGU44f?--P}Sz3wbzB*x3Oca2P^!KjPf6;}Osx zDK4J$sXz;?xy)t)9mGAKYfD`p&>>s7wt1~%VBq}C^{ehL0|U!4?v!o^pgDEi#UFAQ z7}(BnU(G%Obbu<4$n`fs{XGzxse@=CKAW%*phbd{Z5hSc4rc-b>GkF)MiHjXA}ow-lk=FTa&r1s1{CF|W#(+==dx!7 E023WtvH$=8 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 934c5293e814e59e2d5dcc197dfa6d486d813721..a1155b518bbf2f28d4f3eb1c9b475e9cf4e15212 100644 GIT binary patch delta 349 zcmew*^G9ZaO#KH2ue>`93_Lju3vKEc7??LOvYq(Dz`()8sIz+w0|R3MmlbkRHphI)=q9NpYP3=HgE94GAT7#LW5AvCuM=Z+nZfCja2 z@uW`$T42p(HWTO|uDe`Y>iU2VvF6(5wGQZzc&=Y{e}U?hxKp|vfaVOM=^3RP5#Nz&%^DUpI4HYT;h{iTrzndx5nh@EaIEz NFvqfPp3eE01pwCoVwV5_ delta 354 zcmew(^GjxeOnm@@SKb{42A(X2g*J5z49o(IY$yIOFt8^v>g-;_z`&Tmxc0IR0|V0; z#;wdT3=ACQ%qzdtFfedlV1C0^1e8C>vhN9y&u|q&Ge2kfeC!+p1FI72#qu*ibG6xO z?D>HDSs*l5D%B*#RA}7D96yaqighh=GCS z2^UZLRGku4vFRZRreRDu8BLP+X3is1@7VxIY9F= zxUXg(VPN3S<`KF62B^OaLNnFyESd_`&twOtl^M9^@f`dEbSd{c-o$R812`w~UiG{S zG*FYzCM*PK;Oxn^jN)v%nG6iPlAEI#IhZCNtí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 + } +}