From 3105fb8aa80d7851abe2c022b4dba0f42a6bb6e6 Mon Sep 17 00:00:00 2001 From: Darshan Phaldesai Date: Wed, 18 Feb 2026 21:36:09 -0700 Subject: [PATCH] chatbar: move richtext back to main chat --- src/chatbar/ChatBar.qml | 22 ---------------------- src/chatbar/SendBar.qml | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 22 deletions(-) diff --git a/src/chatbar/ChatBar.qml b/src/chatbar/ChatBar.qml index d8727e40b..e726d23a6 100644 --- a/src/chatbar/ChatBar.qml +++ b/src/chatbar/ChatBar.qml @@ -90,28 +90,6 @@ Item { hoverEnabled: true acceptedButtons: Qt.NoButton } - QQC2.Button { - id: chatModeButton - anchors { - bottom: core.top - bottomMargin: Kirigami.Units.smallSpacing - horizontalCenter: root.horizontalCenter - } - - visible: hoverArea.containsMouse || hovered || core.hovered - width: Kirigami.Units.iconSizes.enormous - height: Kirigami.Units.iconSizes.smallMedium - - icon.name: NeoChatConfig.sendMessageWith === 0 ? "arrow-up" : "arrow-down" - text: NeoChatConfig.sendMessageWith === 0 ? i18nc("@action:button", "Enter rich text mode") : i18nc("@action:button", "Exit rich text mode") - display: QQC2.AbstractButton.IconOnly - - onClicked: NeoChatConfig.sendMessageWith = NeoChatConfig.sendMessageWith === 0 ? 1 : 0 - - QQC2.ToolTip.visible: hovered - QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay - QQC2.ToolTip.text: text - } LibNeoChat.DelegateSizeHelper { id: chatBarSizeHelper diff --git a/src/chatbar/SendBar.qml b/src/chatbar/SendBar.qml index fa034cbf3..97c02d7ac 100644 --- a/src/chatbar/SendBar.qml +++ b/src/chatbar/SendBar.qml @@ -8,6 +8,7 @@ import QtQuick.Layouts import org.kde.kirigami as Kirigami +import org.kde.neochat import org.kde.neochat.libneochat as LibNeoChat import org.kde.neochat.messagecontent as MessageContent @@ -188,6 +189,20 @@ RowLayout { QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay QQC2.ToolTip.text: text } + + QQC2.ToolButton { + icon.name: "edit-select-text-symbolic" + text: i18nc("@action:button", "Rich Text") + display: QQC2.AbstractButton.IconOnly + onClicked: NeoChatConfig.sendMessageWith = NeoChatConfig.sendMessageWith === 0 ? 1 : 0 + checkable: true + checked: NeoChatConfig === 1 + + QQC2.ToolTip.visible: hovered + QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay + QQC2.ToolTip.text: text + } + QQC2.ToolButton { id: sendButton icon.name: "document-send"