fix(StatusChatInfoButton): vertically center title if no subtitle is provided

Closes #230
This commit is contained in:
Pascal Precht 2021-07-06 11:26:01 +02:00 committed by Michał Cieślak
parent 5aaa5590c7
commit c08cf4b851
1 changed files with 3 additions and 1 deletions

View File

@ -97,6 +97,7 @@ Rectangle {
Item { Item {
id: statusChatInfoButtonTitle id: statusChatInfoButtonTitle
anchors.top: identicon.top anchors.top: identicon.top
anchors.topMargin: statusChatInfoButtonSubTitle.visible ? 0 : 8
anchors.left: identicon.right anchors.left: identicon.right
anchors.leftMargin: 8 anchors.leftMargin: 8
@ -175,7 +176,8 @@ Rectangle {
id: statusChatInfoButtonSubTitle id: statusChatInfoButtonSubTitle
anchors.left: statusChatInfoButtonTitle.left anchors.left: statusChatInfoButtonTitle.left
anchors.top: statusChatInfoButtonTitle.bottom anchors.top: statusChatInfoButtonTitle.bottom
height: chatType.height visible: !!statusChatInfoButton.subTitle
height: visible ? chatType.height : 0
width: childrenRect.width width: childrenRect.width
StatusBaseText { StatusBaseText {