Fix some input field issue.
This commit is contained in:
parent
b30d92a516
commit
4cc2d443c7
|
@ -72,7 +72,7 @@ RowLayout {
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
onClicked: inputField.insert(inputField.cursorPosition, author.displayName)
|
onClicked: roomPanelInput.insert(author.displayName)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,8 +38,8 @@ Menu {
|
||||||
text: "Reply"
|
text: "Reply"
|
||||||
|
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
inputField.clear()
|
roomPanelInput.clear()
|
||||||
inputField.insert(0, "> <" + model.author.id + "><" + model.eventId + "> " + (selectedText != "" ? selectedText : model.message) + "\n\n")
|
roomPanelInput.insert("> <" + model.author.id + "><" + model.eventId + "> " + (selectedText != "" ? selectedText : model.message) + "\n\n")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MenuItem {
|
MenuItem {
|
||||||
|
|
|
@ -21,11 +21,11 @@ Rectangle {
|
||||||
roomContextMenu.popup()
|
roomContextMenu.popup()
|
||||||
}
|
}
|
||||||
onPrimaryClicked: {
|
onPrimaryClicked: {
|
||||||
|
listView.currentIndex = index
|
||||||
if (category === RoomType.Invited) {
|
if (category === RoomType.Invited) {
|
||||||
inviteDialog.currentRoom = currentRoom
|
inviteDialog.currentRoom = currentRoom
|
||||||
inviteDialog.open()
|
inviteDialog.open()
|
||||||
} else {
|
} else {
|
||||||
listView.currentIndex = index
|
|
||||||
enteredRoom = currentRoom
|
enteredRoom = currentRoom
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -274,6 +274,9 @@ Item {
|
||||||
|
|
||||||
RoomPanelInput {
|
RoomPanelInput {
|
||||||
anchors.verticalCenter: parent.top
|
anchors.verticalCenter: parent.top
|
||||||
|
|
||||||
|
id: roomPanelInput
|
||||||
|
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 48
|
height: 48
|
||||||
}
|
}
|
||||||
|
|
|
@ -189,4 +189,12 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function insert(str) {
|
||||||
|
inputField.insert(inputField.cursorPosition, str)
|
||||||
|
}
|
||||||
|
|
||||||
|
function clear() {
|
||||||
|
inputField.clear()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue