Minor improvements

- Rename TextDelegate to RichLabel since it's not actually a delegate
- Allow web search for whole messages
This commit is contained in:
Tobias Fella
2021-12-15 00:53:43 +01:00
parent 91f3f64bb5
commit 332d6c9782
6 changed files with 19 additions and 25 deletions

View File

@@ -74,13 +74,15 @@ Loader {
QQC2.Menu {
id: webshortcutmenu
title: i18n("Search for '%1'", webshortcutmodel.trunkatedSearchText)
property bool isVisible: selectedText && selectedText.length > 0 && webshortcutmodel.enabled
Component.onCompleted: webshortcutmenu.parent.visible = isVisible
property bool isVisible: webshortcutmodel.enabled
Component.onCompleted: {
webshortcutmenu.parent.visible = isVisible
}
onIsVisibleChanged: webshortcutmenu.parent.visible = isVisible
Instantiator {
model: WebShortcutModel {
id: webshortcutmodel
selectedText: loadRoot.selectedText
selectedText: loadRoot.selectedText ? loadRoot.selectedText : loadRoot.message
onOpenUrl: RoomManager.visitNonMatrix(url)
}
delegate: QQC2.MenuItem {