Make sure that the style menu shows the right style name for code and quote.

Also when in quote mode the valid styles are now transformed to how they look in quote to show they are valid. Clicking quote style again in a quote block will return to paragrpah style from heading now
This commit is contained in:
James Graham
2026-02-07 17:18:26 +00:00
parent 7afce01a23
commit 13d7f9b322
11 changed files with 110 additions and 18 deletions

View File

@@ -17,6 +17,7 @@ QQC2.Popup {
required property MessageContent.ChatBarMessageContentModel chatContentModel
required property ChatButtonHelper chatButtonHelper
required property bool inQuote
y: -implicitHeight
padding: Kirigami.Units.largeSpacing
@@ -35,7 +36,12 @@ QQC2.Popup {
Layout.minimumWidth: Kirigami.Units.gridUnit * 8
Layout.minimumHeight: Kirigami.Units.gridUnit * 2
enabled: chatButtonHelper.richFormatEnabled ||
index == LibNeoChat.RichFormat.Paragraph ||
index == LibNeoChat.RichFormat.Code ||
index == LibNeoChat.RichFormat.Quote
style: index
inQuote: root.inQuote
highlight: root.chatButtonHelper.currentStyle === index || hovered
onPressed: (event) => {