mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 09:57:26 +02:00
Added message padding.
Resolved "listview" rendering warnings. Prevent sending empty messages. Signed-off-by: Armored Dragon <publicmail@armoreddragon.com>
This commit is contained in:
parent
0bc11e8da4
commit
1cddc5a398
2 changed files with 7 additions and 7 deletions
|
@ -186,6 +186,8 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function _sendMessage(message, channel) {
|
function _sendMessage(message, channel) {
|
||||||
|
if (message.length == 0) return;
|
||||||
|
|
||||||
Messages.sendMessage(
|
Messages.sendMessage(
|
||||||
"chat",
|
"chat",
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
|
|
|
@ -11,7 +11,6 @@ Rectangle {
|
||||||
property string last_message_user: ""
|
property string last_message_user: ""
|
||||||
property date last_message_time: new Date()
|
property date last_message_time: new Date()
|
||||||
|
|
||||||
// TODO: Find a better way to do this
|
|
||||||
// When the window is created on the script side, the window starts open.
|
// When the window is created on the script side, the window starts open.
|
||||||
// Once the QML window is created wait, then send the initialized signal.
|
// Once the QML window is created wait, then send the initialized signal.
|
||||||
// This signal is mostly used to close the "Desktop overlay window" script side
|
// This signal is mostly used to close the "Desktop overlay window" script side
|
||||||
|
@ -154,7 +153,7 @@ Rectangle {
|
||||||
property string delegateText: model.text
|
property string delegateText: model.text
|
||||||
property string delegateUsername: model.username
|
property string delegateUsername: model.username
|
||||||
property string delegateDate: model.date
|
property string delegateDate: model.date
|
||||||
width: parent.width // FIXME: Causes warning, but required for style?
|
width: listview.width
|
||||||
|
|
||||||
sourceComponent: {
|
sourceComponent: {
|
||||||
if (model.type === "chat") {
|
if (model.type === "chat") {
|
||||||
|
@ -339,12 +338,12 @@ Rectangle {
|
||||||
property string username: delegateUsername
|
property string username: delegateUsername
|
||||||
property string date: delegateDate
|
property string date: delegateDate
|
||||||
|
|
||||||
width: parent.width
|
|
||||||
height: Math.max(65, children[1].height + 30)
|
height: Math.max(65, children[1].height + 30)
|
||||||
color: index % 2 === 0 ? "transparent" : Qt.rgba(0.15,0.15,0.15,1)
|
color: index % 2 === 0 ? "transparent" : Qt.rgba(0.15,0.15,0.15,1)
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
width: parent.width
|
width: parent.width - 10
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
height: 22
|
height: 22
|
||||||
|
|
||||||
Text{
|
Text{
|
||||||
|
@ -361,6 +360,7 @@ Rectangle {
|
||||||
|
|
||||||
TextEdit{
|
TextEdit{
|
||||||
anchors.top: parent.children[0].bottom
|
anchors.top: parent.children[0].bottom
|
||||||
|
x: 5
|
||||||
text: texttest
|
text: texttest
|
||||||
color:"white"
|
color:"white"
|
||||||
font.pointSize: 12
|
font.pointSize: 12
|
||||||
|
@ -368,7 +368,7 @@ Rectangle {
|
||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
selectByKeyboard: true
|
selectByKeyboard: true
|
||||||
width: parent.width * 0.8
|
width: parent.width * 0.8
|
||||||
height: contentHeight // Adjust height to fit content
|
height: contentHeight
|
||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
textFormat: TextEdit.RichText
|
textFormat: TextEdit.RichText
|
||||||
|
|
||||||
|
@ -382,8 +382,6 @@ Rectangle {
|
||||||
Component {
|
Component {
|
||||||
id: template_notification
|
id: template_notification
|
||||||
|
|
||||||
// width: (Math.min(parent.width * 0.8, Math.max(contentWidth, parent.width))) - parent.children[0].width
|
|
||||||
|
|
||||||
Rectangle{
|
Rectangle{
|
||||||
property int index: delegateIndex
|
property int index: delegateIndex
|
||||||
property string texttest: delegateText
|
property string texttest: delegateText
|
||||||
|
|
Loading…
Reference in a new issue