From 23c0bdb647af43db0aa0874e055dfb3b0ff6a9a0 Mon Sep 17 00:00:00 2001 From: James Graham Date: Thu, 26 Feb 2026 19:50:26 +0000 Subject: [PATCH] Improve the label for showing the rich text controls and tell users what pressing enter will do. --- src/chatbar/ChatBar.qml | 23 ++++++++++++++++------- src/chatbar/ChatBarCore.qml | 6 +++--- src/chatbar/SendBar.qml | 2 +- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/src/chatbar/ChatBar.qml b/src/chatbar/ChatBar.qml index d5d9672ea..ad583a049 100644 --- a/src/chatbar/ChatBar.qml +++ b/src/chatbar/ChatBar.qml @@ -67,16 +67,25 @@ Item { } } - implicitHeight: core.implicitHeight + Kirigami.Units.largeSpacing + implicitHeight: column.implicitHeight + Kirigami.Units.largeSpacing - ChatBarCore { - id: core + ColumnLayout { + id: column anchors.top: root.top anchors.horizontalCenter: root.horizontalCenter - - Message.room: root.currentRoom - room: root.currentRoom - maxAvailableWidth: chatBarSizeHelper.availableWidth + ChatBarCore { + id: core + Message.room: root.currentRoom + room: root.currentRoom + maxAvailableWidth: chatBarSizeHelper.availableWidth + } + QQC2.Label { + Layout.fillWidth: true + visible: !Kirigami.Setting.isMobile + text: NeoChatConfig.sendMessageWith === 1 ? i18nc("As in enter starts a new line in the chat bar", "Enter starts a new line") : i18nc("As in enter starts send the chat message", "Enter sends the message") + horizontalAlignment: Text.AlignRight + font.pointSize: Kirigami.Theme.defaultFont.pointSize * NeoChatConfig.fontScale * 0.75 + } } LibNeoChat.DelegateSizeHelper { id: chatBarSizeHelper diff --git a/src/chatbar/ChatBarCore.qml b/src/chatbar/ChatBarCore.qml index b4f3bdf18..74f5ee236 100644 --- a/src/chatbar/ChatBarCore.qml +++ b/src/chatbar/ChatBarCore.qml @@ -74,13 +74,13 @@ QQC2.Control { QQC2.ToolButton { id: emojiButton property EmojiDialog dialog - + icon.name: "smiley" text: i18n("Emojis & Stickers") display: QQC2.AbstractButton.IconOnly checkable: true checked: dialog !== null - + onClicked: { if(!checked){ if(dialog) { @@ -108,7 +108,7 @@ QQC2.Control { QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay QQC2.ToolTip.text: text } - + QQC2.ScrollView { id: chatScrollView Layout.fillWidth: true diff --git a/src/chatbar/SendBar.qml b/src/chatbar/SendBar.qml index 6e4a55658..d0435acb1 100644 --- a/src/chatbar/SendBar.qml +++ b/src/chatbar/SendBar.qml @@ -192,7 +192,7 @@ RowLayout { QQC2.ToolButton { icon.name: "edit-select-text-symbolic" - text: i18nc("@action:button", "Rich Text") + text: NeoChatConfig.sendMessageWith === 1 ? i18nc("@action:button", "Hide Rich Text Controls") : i18nc("@action:button", "Show Rich Text Controls") display: QQC2.AbstractButton.IconOnly checkable: true checked: NeoChatConfig.sendMessageWith === 1