fix(StatusChatInfoButton): StatusChatInfoButton takes up entire available width

fixes #432
This commit is contained in:
Khushboo Mehta 2021-10-05 12:56:31 +02:00 committed by Pascal Precht
parent dce45c2ff3
commit c276a90e73
2 changed files with 7 additions and 1 deletions

View File

@ -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 {

View File

@ -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: "<style>a:link { color: " + (!!hoveredLink ? statusSelectableText.hoveredLinkColor : Theme.palette.baseColor1) + "; }</style>" + statusSelectableText.text
}