Fix #55.
This commit is contained in:
parent
56b820e1a8
commit
0654a8b2b6
|
@ -17,6 +17,7 @@ Control {
|
||||||
onSecondaryClicked: {
|
onSecondaryClicked: {
|
||||||
messageContextMenu.row = messageRow
|
messageContextMenu.row = messageRow
|
||||||
messageContextMenu.model = model
|
messageContextMenu.model = model
|
||||||
|
messageContextMenu.selectedText = contentLabel.selectedText
|
||||||
messageContextMenu.popup()
|
messageContextMenu.popup()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,6 +72,8 @@ RowLayout {
|
||||||
TextEdit {
|
TextEdit {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
id: contentLabel
|
||||||
|
|
||||||
text: (highlighted ? "<style>a{color: white;} .user-pill{color: white}</style>" : "<style>a{color: " + Material.accent + ";} .user-pill{color: " + Material.accent + "}</style>") + display
|
text: (highlighted ? "<style>a{color: white;} .user-pill{color: white}</style>" : "<style>a{color: " + Material.accent + ";} .user-pill{color: " + Material.accent + "}</style>") + display
|
||||||
|
|
||||||
visible: isText
|
visible: isText
|
||||||
|
|
|
@ -121,6 +121,7 @@ Item {
|
||||||
verticalLayoutDirection: ListView.BottomToTop
|
verticalLayoutDirection: ListView.BottomToTop
|
||||||
spacing: 8
|
spacing: 8
|
||||||
|
|
||||||
|
cacheBuffer: 200
|
||||||
flickDeceleration: 4096
|
flickDeceleration: 4096
|
||||||
|
|
||||||
boundsBehavior: Flickable.DragOverBounds
|
boundsBehavior: Flickable.DragOverBounds
|
||||||
|
@ -130,7 +131,7 @@ Item {
|
||||||
onContentYChanged: {
|
onContentYChanged: {
|
||||||
// Check whether we're about to bump into the ceiling in 2 seconds
|
// Check whether we're about to bump into the ceiling in 2 seconds
|
||||||
var curVelocity = verticalVelocity // Snapshot the current speed
|
var curVelocity = verticalVelocity // Snapshot the current speed
|
||||||
if(curVelocity < 0 && contentY + curVelocity * 2 < originY)
|
if(curVelocity < 0 && contentY - 5000 < originY)
|
||||||
{
|
{
|
||||||
currentRoom.getPreviousContent(50);
|
currentRoom.getPreviousContent(50);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import QtQuick.Controls 2.2
|
||||||
Menu {
|
Menu {
|
||||||
property var row: null
|
property var row: null
|
||||||
property var model: null
|
property var model: null
|
||||||
|
property string selectedText
|
||||||
|
|
||||||
readonly property bool isFile: model && (model.eventType === "video" || model.eventType === "audio" || model.eventType === "file" || model.eventType === "image")
|
readonly property bool isFile: model && (model.eventType === "video" || model.eventType === "audio" || model.eventType === "file" || model.eventType === "image")
|
||||||
|
|
||||||
|
@ -48,7 +49,7 @@ Menu {
|
||||||
|
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
inputField.clear()
|
inputField.clear()
|
||||||
inputField.insert(0, "> <" + model.author.id + "><" + model.eventId + "> " + model.message + "\n\n")
|
inputField.insert(0, "> <" + model.author.id + "><" + model.eventId + "> " + (selectedText != "" ? selectedText : model.message) + "\n\n")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MenuItem {
|
MenuItem {
|
||||||
|
|
Loading…
Reference in New Issue