Single line click handler

pull/270/head
Nicolas Werner 4 years ago
parent b934cf329c
commit 94e1b52ddd
  1. 20
      resources/qml/UserProfile.qml

@ -70,8 +70,8 @@ ApplicationWindow{
id: verifyUserButton id: verifyUserButton
text: "Verify" text: "Verify"
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
enabled: profile.isUserVerified?false:true enabled: profile.isUserVerified
visible: profile.isUserVerified?false:true visible: profile.isUserVerified
onClicked: { onClicked: {
var newFlow = profile.createFlow(true); var newFlow = profile.createFlow(true);
@ -92,9 +92,7 @@ ApplicationWindow{
hoverEnabled: true hoverEnabled: true
ToolTip.visible: hovered ToolTip.visible: hovered
ToolTip.text: qsTr("Ban the user") ToolTip.text: qsTr("Ban the user")
onClicked : { onClicked: profile.banUser()
profile.banUser()
}
} }
// ImageButton{ // ImageButton{
// image:":/icons/icons/ui/volume-off-indicator.png" // image:":/icons/icons/ui/volume-off-indicator.png"
@ -113,18 +111,14 @@ ApplicationWindow{
hoverEnabled: true hoverEnabled: true
ToolTip.visible: hovered ToolTip.visible: hovered
ToolTip.text: qsTr("Start a private chat") ToolTip.text: qsTr("Start a private chat")
onClicked : { onClicked: profile.startChat()
profile.startChat()
}
} }
ImageButton{ ImageButton{
image:":/icons/icons/ui/round-remove-button.png" image:":/icons/icons/ui/round-remove-button.png"
hoverEnabled: true hoverEnabled: true
ToolTip.visible: hovered ToolTip.visible: hovered
ToolTip.text: qsTr("Kick the user") ToolTip.text: qsTr("Kick the user")
onClicked : { onClicked: profile.kickUser()
profile.kickUser()
}
} }
} }
@ -152,8 +146,8 @@ ApplicationWindow{
Layout.alignment: Qt.AlignLeft Layout.alignment: Qt.AlignLeft
elide: Text.ElideRight elide: Text.ElideRight
color: colors.text
font.bold: true font.bold: true
color: colors.text
text: model.deviceId text: model.deviceId
} }
Text{ Text{
@ -161,7 +155,7 @@ ApplicationWindow{
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
elide: Text.ElideRight elide: Text.ElideRight
color:colors.text color: colors.text
text: model.deviceName text: model.deviceName
} }
} }

Loading…
Cancel
Save