From 853d48e768df2c083ea6ffba76ec790cf025d3d2 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Thu, 29 Jan 2026 15:33:34 +0100 Subject: [PATCH] Improve the structure of the welcome page slightly I don't really like these pages in NeoChat much, there's only a few buttons, and they really blend together. In an attempt to alleviate this problem, I did the following: * Added icons to the Login and Register actions, which does complement the other buttons on this page. * Removed the icons from the "Continue" and "Go back" buttons, which did nothing but add confusing arrows. * Moved the "Go back" button, fixed the capitalization and moved it to a separate FormCard. * Made it so the "Settings" button is only shown on the initial page, to reduce the amount of UI clutter while logging in. --- src/login/LoginRegister.qml | 2 ++ src/login/WelcomePage.qml | 26 +++++++++++++++----------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/login/LoginRegister.qml b/src/login/LoginRegister.qml index e6767dba9..e4cd409b7 100644 --- a/src/login/LoginRegister.qml +++ b/src/login/LoginRegister.qml @@ -21,6 +21,7 @@ LoginStep { FormCard.FormButtonDelegate { id: loginButton + icon.name: "user-symbolic" text: i18nc("@action:button", "Login") onClicked: root.processed("Login") } @@ -28,6 +29,7 @@ LoginStep { FormCard.FormDelegateSeparator {} FormCard.FormButtonDelegate { + icon.name: "network-server-symbolic" text: i18nc("@action:button", "Register") onClicked: root.processed("Homeserver") } diff --git a/src/login/WelcomePage.qml b/src/login/WelcomePage.qml index 56c09c81f..01e9cfda6 100644 --- a/src/login/WelcomePage.qml +++ b/src/login/WelcomePage.qml @@ -19,7 +19,7 @@ Kirigami.Page { property bool showExisting: false property bool _showExisting: showExisting && root.currentStepString === root.initialStep - property bool showSettings: true + property bool showSettings: _showExisting property alias currentStep: module.item property string currentStepString: initialStep property string initialStep: "LoginRegister" @@ -245,6 +245,7 @@ Kirigami.Page { } FormCard.FormDelegateSeparator { + above: null // Set this manually so KA doesn't decide to pick another unrelated delegate below: continueButton visible: (root.currentStep as LoginStep).nextAction } @@ -254,28 +255,31 @@ Kirigami.Page { text: (root.currentStep as LoginStep).nextAction && (root.currentStep as LoginStep).nextAction.text ? (root.currentStep as LoginStep).nextAction.text : i18nc("@action:button", "Continue") visible: (root.currentStep as LoginStep).nextAction onClicked: (root.currentStep as LoginStep).nextAction.trigger() - icon.name: "arrow-right-symbolic" enabled: (root.currentStep as LoginStep).nextAction ? (root.currentStep as LoginStep).nextAction.enabled : false } - - FormCard.FormButtonDelegate { - text: i18nc("@action:button", "Go back") - visible: (root.currentStep as LoginStep).previousAction - onClicked: (root.currentStep as LoginStep).previousAction.trigger() - icon.name: "arrow-left-symbolic" - enabled: (root.currentStep as LoginStep).previousAction ? (root.currentStep as LoginStep).previousAction.enabled : false - } } FormCard.FormCard { Layout.topMargin: Kirigami.Units.largeSpacing * 2 maximumWidth: Kirigami.Units.gridUnit * 20 - visible: root.showSettings + visible: root.showSettings || previousButtonDelegate.visible + FormCard.FormButtonDelegate { text: i18nc("@action:button", "Settings") icon.name: "settings-configure" + visible: root.showSettings onClicked: NeoChatSettingsView.open() } + + FormCard.FormButtonDelegate { + id: previousButtonDelegate + + text: i18nc("@action:button", "Go Back") + visible: (root.currentStep as LoginStep).previousAction + onClicked: (root.currentStep as LoginStep).previousAction.trigger() + enabled: (root.currentStep as LoginStep).previousAction ? (root.currentStep as LoginStep).previousAction.enabled : false + trailingLogo.direction: Qt.LeftArrow + } } } }