diff --git a/ui/imports/shared/views/chat/InvitationBubbleView.qml b/ui/imports/shared/views/chat/InvitationBubbleView.qml index 3c755abf4b..5b2174f39f 100644 --- a/ui/imports/shared/views/chat/InvitationBubbleView.qml +++ b/ui/imports/shared/views/chat/InvitationBubbleView.qml @@ -280,36 +280,49 @@ Item { color: Style.current.separator } - StatusFlatButton { - id: joinBtn - + Item { Layout.fillWidth: true Layout.preferredHeight: 44 - - text: qsTr("Unsupported state") - - onClicked: { - if (rectangleBubble.state === "joined") { - root.store.setActiveCommunity(communityId); - return + clip: true + StatusFlatButton { + id: joinBtn + width: parent.width + height: (parent.height+Style.current.padding) + anchors.top: parent.top + anchors.topMargin: -Style.current.padding + text: qsTr("Unsupported state") + contentItem: Item { + StatusBaseText { + anchors.centerIn: parent + anchors.verticalCenterOffset: Style.current.halfPadding + font: joinBtn.font + color: joinBtn.enabled ? joinBtn.textColor : joinBtn.disabledTextColor + text: joinBtn.text + } } - if (rectangleBubble.state === "unjoined") { - Global.openPopup(communityIntroDialog, { joinMethod: () => { - let error = root.store.joinCommunity(communityId, userProfile.name) - if (error) joiningError.showError(error) - } }); - } - else if (rectangleBubble.state === "requestToJoin") { - Global.openPopup(communityIntroDialog, { joinMethod: () => { - let error = root.store.requestToJoinCommunity(communityId, userProfile.name) - if (error) joiningError.showError(error) - } }); - } - } - Component.onCompleted: { - // FIXME: extract StatusButtonBackground or expose radius property in StatusBaseButton - background.radius = 16 + onClicked: { + if (rectangleBubble.state === "joined") { + root.store.setActiveCommunity(communityId); + return + } + if (rectangleBubble.state === "unjoined") { + Global.openPopup(communityIntroDialog, { joinMethod: () => { + let error = root.store.joinCommunity(communityId, userProfile.name) + if (error) joiningError.showError(error) + } }); + } + else if (rectangleBubble.state === "requestToJoin") { + Global.openPopup(communityIntroDialog, { joinMethod: () => { + let error = root.store.requestToJoinCommunity(communityId, userProfile.name) + if (error) joiningError.showError(error) + } }); + } + } + + Component.onCompleted: { + background.radius = Style.current.padding; + } } } } diff --git a/ui/imports/shared/views/chat/LinksMessageView.qml b/ui/imports/shared/views/chat/LinksMessageView.qml index 88f48ebd11..768977f884 100644 --- a/ui/imports/shared/views/chat/LinksMessageView.qml +++ b/ui/imports/shared/views/chat/LinksMessageView.qml @@ -377,6 +377,9 @@ Column { } width: parent.width anchors.top: sep1.bottom + Component.onCompleted: { + background.radius = 0; + } } Separator { @@ -385,13 +388,33 @@ Column { anchors.topMargin: 0 } - StatusFlatButton { - text: qsTr("Don't ask me again") - onClicked: { - RootStore.setNeverAskAboutUnfurlingAgain(true); - } + Item { width: parent.width + height: 44 anchors.top: sep2.bottom + clip: true + StatusFlatButton { + id: dontAskBtn + width: parent.width + height: (parent.height+Style.current.padding) + anchors.top: parent.top + anchors.topMargin: -Style.current.padding + contentItem: Item { + StatusBaseText { + anchors.centerIn: parent + anchors.verticalCenterOffset: Style.current.halfPadding + font: dontAskBtn.font + color: dontAskBtn.enabled ? dontAskBtn.textColor : dontAskBtn.disabledTextColor + text: qsTr("Don't ask me again") + } + } + onClicked: { + RootStore.setNeverAskAboutUnfurlingAgain(true); + } + Component.onCompleted: { + background.radius = Style.current.padding; + } + } } } }