Compare commits
1 Commits
work/nvrwh
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
df8a09ce90 |
@@ -490,6 +490,7 @@
|
|||||||
<content_attribute id="social-chat">intense</content_attribute>
|
<content_attribute id="social-chat">intense</content_attribute>
|
||||||
</content_rating>
|
</content_rating>
|
||||||
<releases>
|
<releases>
|
||||||
|
<release version="25.12.3" date="2026-03-05"/>
|
||||||
<release version="25.12.2" date="2026-02-05"/>
|
<release version="25.12.2" date="2026-02-05"/>
|
||||||
<release version="25.12.1" date="2026-01-08"/>
|
<release version="25.12.1" date="2026-01-08"/>
|
||||||
<release version="25.12.0" date="2025-12-11"/>
|
<release version="25.12.0" date="2025-12-11"/>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import org.kde.neochat
|
|||||||
/**
|
/**
|
||||||
* @brief A component to show rich text from a message.
|
* @brief A component to show rich text from a message.
|
||||||
*/
|
*/
|
||||||
TextEdit {
|
QQC2.TextArea {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -106,6 +106,15 @@ TextEdit {
|
|||||||
readOnly: !root.editable
|
readOnly: !root.editable
|
||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
textFormat: Text.RichText
|
textFormat: Text.RichText
|
||||||
|
placeholderText: if (!editable || index !== (Message.contentModel?.hasAttachment ? 1 : 0)) {
|
||||||
|
return "";
|
||||||
|
} else if (Message.contentModel?.hasAttachment) {
|
||||||
|
i18nc("@placeholder", "Set an attachment caption…")
|
||||||
|
} else if (Message.room?.usesEncryption) {
|
||||||
|
i18nc("@placeholder", "Send an encrypted message…")
|
||||||
|
} else {
|
||||||
|
i18nc("@placeholder", "Send a message…")
|
||||||
|
}
|
||||||
|
|
||||||
onLinkActivated: link => {
|
onLinkActivated: link => {
|
||||||
if (!root.editable) {
|
if (!root.editable) {
|
||||||
@@ -120,29 +129,6 @@ TextEdit {
|
|||||||
|
|
||||||
Component.onCompleted: manageDefaultMenus()
|
Component.onCompleted: manageDefaultMenus()
|
||||||
|
|
||||||
QQC2.Label {
|
|
||||||
id: placeholder
|
|
||||||
x: root.leftPadding
|
|
||||||
y: root.topPadding
|
|
||||||
width: root.width - (root.leftPadding + root.rightPadding)
|
|
||||||
height: root.height - (root.topPadding + root.bottomPadding)
|
|
||||||
|
|
||||||
text: if (root.Message.contentModel?.hasAttachment) {
|
|
||||||
i18nc("@placeholder", "Set an attachment caption…")
|
|
||||||
} else if (root.Message.room?.usesEncryption) {
|
|
||||||
i18nc("@placeholder", "Send an encrypted message…")
|
|
||||||
} else {
|
|
||||||
i18nc("@placeholder", "Send a message…")
|
|
||||||
}
|
|
||||||
font: root.font
|
|
||||||
color: Kirigami.Theme.disabledTextColor
|
|
||||||
horizontalAlignment: root.horizontalAlignment
|
|
||||||
verticalAlignment: root.verticalAlignment
|
|
||||||
visible: root.editable && root.index === (root.Message.contentModel?.hasAttachment ? 1 : 0) && (root.Message.contentModel?.rowCount() ?? 0) <= 1 && !root.length && !root.preeditText && (!root.activeFocus || root.horizontalAlignment !== Qt.AlignHCenter)
|
|
||||||
elide: Text.ElideRight
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
}
|
|
||||||
|
|
||||||
HoverHandler {
|
HoverHandler {
|
||||||
cursorShape: root.hoveredLink || (!(root.componentAttributes?.spoilerRevealed ?? false) && root.hasSpoiler) ? Qt.PointingHandCursor : Qt.IBeamCursor
|
cursorShape: root.hoveredLink || (!(root.componentAttributes?.spoilerRevealed ?? false) && root.hasSpoiler) ? Qt.PointingHandCursor : Qt.IBeamCursor
|
||||||
}
|
}
|
||||||
@@ -183,4 +169,6 @@ TextEdit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
background: null
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user