From fb290392b42e1c567f99fefc91cc61bdb0994a9b Mon Sep 17 00:00:00 2001 From: Khushboo Mehta Date: Tue, 5 Oct 2021 12:56:31 +0200 Subject: [PATCH] fix(StatusChatInfoButton): StatusChatInfoButton takes up entire available width fixes #432 --- ui/StatusQ/src/StatusQ/Controls/StatusChatInfoButton.qml | 2 ++ ui/StatusQ/src/StatusQ/Controls/StatusSelectableText.qml | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ui/StatusQ/src/StatusQ/Controls/StatusChatInfoButton.qml b/ui/StatusQ/src/StatusQ/Controls/StatusChatInfoButton.qml index a33efc2a4b..7184079571 100644 --- a/ui/StatusQ/src/StatusQ/Controls/StatusChatInfoButton.qml +++ b/ui/StatusQ/src/StatusQ/Controls/StatusChatInfoButton.qml @@ -27,6 +27,7 @@ Rectangle { signal clicked(var mouse) signal pinnedMessagesCountClicked(var mouse) signal unmute() + signal linkActivated(string link) enum Type { Unknown0, // 0 @@ -213,6 +214,7 @@ Rectangle { font.pixelSize: 12 width: Math.min(parent.width - (pinIcon.visible ? divider.width + divider.anchors.leftMargin + pinIcon.width + pinIcon.anchors.leftMargin : 0), implicitWidth) + onLinkActivated: statusChatInfoButton.linkActivated(link) } Rectangle { diff --git a/ui/StatusQ/src/StatusQ/Controls/StatusSelectableText.qml b/ui/StatusQ/src/StatusQ/Controls/StatusSelectableText.qml index ca594098d4..77a35518ed 100644 --- a/ui/StatusQ/src/StatusQ/Controls/StatusSelectableText.qml +++ b/ui/StatusQ/src/StatusQ/Controls/StatusSelectableText.qml @@ -26,7 +26,9 @@ Item { property alias verticalAlignmet: edit.verticalAlignment property alias horizontalAlignment: edit.horizontalAlignment - implicitWidth: 448 + signal linkActivated(string link) + + implicitWidth: multiline ? 0 : edit.implicitWidth implicitHeight: edit.implicitHeight clip:true @@ -93,6 +95,8 @@ Item { } } + onLinkActivated: statusSelectableText.linkActivated(link) + text: "" + statusSelectableText.text }