fix(InvitationBubbleView): Fixed layout and button radius
This commit is contained in:
parent
62b0269fff
commit
6d15f8c16f
|
@ -34,6 +34,8 @@ Button {
|
||||||
property color disabledTextColor
|
property color disabledTextColor
|
||||||
property color borderColor: "transparent"
|
property color borderColor: "transparent"
|
||||||
|
|
||||||
|
property int radius: size === StatusBaseButton.Size.Tiny ? 6 : 8
|
||||||
|
|
||||||
property int size: StatusBaseButton.Size.Large
|
property int size: StatusBaseButton.Size.Large
|
||||||
property int type: StatusBaseButton.Type.Normal
|
property int type: StatusBaseButton.Type.Normal
|
||||||
|
|
||||||
|
@ -70,7 +72,7 @@ Button {
|
||||||
icon.width: 24
|
icon.width: 24
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
radius: root.size === StatusBaseButton.Size.Tiny ? 6 : 8
|
radius: root.radius
|
||||||
border.color: root.borderColor
|
border.color: root.borderColor
|
||||||
color: {
|
color: {
|
||||||
if (root.enabled)
|
if (root.enabled)
|
||||||
|
|
|
@ -27,6 +27,7 @@ Item {
|
||||||
property var invitedCommunity
|
property var invitedCommunity
|
||||||
|
|
||||||
readonly property int margin: 12
|
readonly property int margin: 12
|
||||||
|
readonly property int radius: 16
|
||||||
|
|
||||||
function getCommunity() {
|
function getCommunity() {
|
||||||
try {
|
try {
|
||||||
|
@ -81,16 +82,16 @@ Item {
|
||||||
id: rectangleBubble
|
id: rectangleBubble
|
||||||
|
|
||||||
width: 270
|
width: 270
|
||||||
height: columnLayout.implicitHeight
|
height: columnLayout.implicitHeight + border.width * 2
|
||||||
radius: 16
|
radius: d.radius
|
||||||
color: Style.current.background
|
color: Style.current.background
|
||||||
border.color: Style.current.border
|
border.color: Style.current.border
|
||||||
border.width: 1
|
border.width: 1
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: columnLayout
|
id: columnLayout
|
||||||
|
anchors.fill: parent
|
||||||
width: parent.width
|
anchors.margins: 1
|
||||||
|
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
|
@ -217,6 +218,7 @@ Item {
|
||||||
Layout.preferredHeight: 44
|
Layout.preferredHeight: 44
|
||||||
|
|
||||||
text: qsTr("Go to Community")
|
text: qsTr("Go to Community")
|
||||||
|
radius: d.radius - 1 // We do -1, otherwise there's a gap between border and button
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (d.invitedCommunity.joined || d.invitedCommunity.spectated) {
|
if (d.invitedCommunity.joined || d.invitedCommunity.spectated) {
|
||||||
|
@ -225,11 +227,6 @@ Item {
|
||||||
root.store.spectateCommunity(communityId, userProfile.name)
|
root.store.spectateCommunity(communityId, userProfile.name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
|
||||||
// FIXME: extract StatusButtonBackground or expose radius property in StatusBaseButton
|
|
||||||
background.radius = 16
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue