From 519d3610ef9dc484cb8c82f8fdcc46381a86cd60 Mon Sep 17 00:00:00 2001 From: miruka Date: Thu, 18 Jul 2019 20:39:13 -0400 Subject: [PATCH] Change HTextField borders, SignIn disable buttons By default now, fields have a transparent border if not focused and accent-color border if focused. Set `bordered: false` for no border at all. The register and forgot buttons on the SignIn screen are now disabled, since their functions aren't implemented yet. --- src/qml/Base/HInterfaceBox.qml | 1 + src/qml/Base/HLabeledTextField.qml | 1 - src/qml/Base/HTextField.qml | 2 +- src/qml/Chat/RoomSidePane/MembersView.qml | 1 + src/qml/Pages/SignIn.qml | 6 +++--- src/qml/SidePane/AccountDelegate.qml | 1 + src/qml/SidePane/PaneToolBar.qml | 1 + src/qml/Theme.qml | 2 +- 8 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/qml/Base/HInterfaceBox.qml b/src/qml/Base/HInterfaceBox.qml index c59feab0..2a54efd5 100644 --- a/src/qml/Base/HInterfaceBox.qml +++ b/src/qml/Base/HInterfaceBox.qml @@ -52,6 +52,7 @@ HScalingBox { id: button text: modelData.text iconName: modelData.iconName || "" + enabled: modelData.enabled === false ? false : true onClicked: buttonCallbacks[modelData.name](button) Layout.fillWidth: true diff --git a/src/qml/Base/HLabeledTextField.qml b/src/qml/Base/HLabeledTextField.qml index 71f31f94..8364dbdc 100644 --- a/src/qml/Base/HLabeledTextField.qml +++ b/src/qml/Base/HLabeledTextField.qml @@ -16,7 +16,6 @@ Column { HTextField { id: textField - bordered: true radius: 2 width: parent.width } diff --git a/src/qml/Base/HTextField.qml b/src/qml/Base/HTextField.qml index 27f45b66..18ddeb57 100644 --- a/src/qml/Base/HTextField.qml +++ b/src/qml/Base/HTextField.qml @@ -11,7 +11,7 @@ TextField { readonly property QtObject _tf: theme.controls.textField - property bool bordered: false + property bool bordered: true property color backgroundColor: _tf.background property color borderColor: _tf.border property color focusedBackgroundColor: _tf.focusedBackground diff --git a/src/qml/Chat/RoomSidePane/MembersView.qml b/src/qml/Chat/RoomSidePane/MembersView.qml index ea9a5952..89cc4a84 100644 --- a/src/qml/Chat/RoomSidePane/MembersView.qml +++ b/src/qml/Chat/RoomSidePane/MembersView.qml @@ -43,6 +43,7 @@ HColumnLayout { id: filterField placeholderText: qsTr("Filter members") backgroundColor: theme.sidePane.filterRooms.background + bordered: false Layout.fillWidth: true Layout.preferredHeight: theme.baseElementsHeight diff --git a/src/qml/Pages/SignIn.qml b/src/qml/Pages/SignIn.qml index 77ecc9c2..36950af4 100644 --- a/src/qml/Pages/SignIn.qml +++ b/src/qml/Pages/SignIn.qml @@ -17,9 +17,9 @@ Item { enterButtonTarget: "login" buttonModel: [ - { name: "register", text: qsTr("Register") }, - { name: "login", text: qsTr("Login") }, - { name: "forgot", text: qsTr("Forgot?") } + { name: "register", text: qsTr("Register"), enabled: false }, + { name: "login", text: qsTr("Login"), enabled: true }, + { name: "forgot", text: qsTr("Forgot?"), enabled: false } ] buttonCallbacks: ({ diff --git a/src/qml/SidePane/AccountDelegate.qml b/src/qml/SidePane/AccountDelegate.qml index 896383f3..7f79e769 100644 --- a/src/qml/SidePane/AccountDelegate.qml +++ b/src/qml/SidePane/AccountDelegate.qml @@ -54,6 +54,7 @@ Column { placeholderText: qsTr("Set status message") font.pixelSize: theme.fontSize.small background: null + bordered: false padding: 0 leftPadding: accountLabel.leftPadding diff --git a/src/qml/SidePane/PaneToolBar.qml b/src/qml/SidePane/PaneToolBar.qml index 346de188..38b98190 100644 --- a/src/qml/SidePane/PaneToolBar.qml +++ b/src/qml/SidePane/PaneToolBar.qml @@ -22,6 +22,7 @@ HRowLayout { id: filterField placeholderText: qsTr("Filter rooms") backgroundColor: theme.sidePane.filterRooms.background + bordered: false Layout.fillWidth: true Layout.preferredHeight: parent.height diff --git a/src/qml/Theme.qml b/src/qml/Theme.qml index fcfb359e..f945fa20 100644 --- a/src/qml/Theme.qml +++ b/src/qml/Theme.qml @@ -62,7 +62,7 @@ QtObject { property QtObject textField: QtObject { property color background: colors.background2 - property color border: "black" + property color border: "transparent" property color focusedBackground: background property color focusedBorder: colors.accent property int borderWidth: 1