More per user color.
This commit is contained in:
@@ -37,6 +37,7 @@ RowLayout {
|
|||||||
visible: avatarVisible
|
visible: avatarVisible
|
||||||
hint: author.displayName
|
hint: author.displayName
|
||||||
source: author.avatarMediaId
|
source: author.avatarMediaId
|
||||||
|
color: author.color
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: userDetailDialog
|
id: userDetailDialog
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ RowLayout {
|
|||||||
visible: avatarVisible
|
visible: avatarVisible
|
||||||
hint: author.displayName
|
hint: author.displayName
|
||||||
source: author.avatarMediaId
|
source: author.avatarMediaId
|
||||||
|
color: author.color
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: userDetailDialog
|
id: userDetailDialog
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ ColumnLayout {
|
|||||||
readonly property bool darkBackground: !sentByMe
|
readonly property bool darkBackground: !sentByMe
|
||||||
readonly property bool replyVisible: reply || false
|
readonly property bool replyVisible: reply || false
|
||||||
readonly property bool failed: marks === EventStatus.SendingFailed
|
readonly property bool failed: marks === EventStatus.SendingFailed
|
||||||
|
readonly property color authorColor: eventType === "notice" ? MPalette.primary : author.color
|
||||||
|
readonly property color replyAuthorColor: replyVisible ? reply.author.color : MPalette.accent
|
||||||
|
|
||||||
signal saveFileAs()
|
signal saveFileAs()
|
||||||
signal openExternally()
|
signal openExternally()
|
||||||
@@ -42,6 +44,7 @@ ColumnLayout {
|
|||||||
visible: avatarVisible
|
visible: avatarVisible
|
||||||
hint: author.displayName
|
hint: author.displayName
|
||||||
source: author.avatarMediaId
|
source: author.avatarMediaId
|
||||||
|
color: author.color
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: userDetailDialog
|
id: userDetailDialog
|
||||||
@@ -76,7 +79,7 @@ ColumnLayout {
|
|||||||
|
|
||||||
id: bubbleBackground
|
id: bubbleBackground
|
||||||
|
|
||||||
color: sentByMe ? MPalette.background : eventType === "notice" ? MPalette.primary : author.color
|
color: sentByMe ? MPalette.background : authorColor
|
||||||
radius: 18
|
radius: 18
|
||||||
|
|
||||||
topLeftVisible: !sentByMe && (bubbleShape == 3 || bubbleShape == 2)
|
topLeftVisible: !sentByMe && (bubbleShape == 3 || bubbleShape == 2)
|
||||||
@@ -135,6 +138,8 @@ ColumnLayout {
|
|||||||
Layout.leftMargin: 8
|
Layout.leftMargin: 8
|
||||||
Layout.rightMargin: 8
|
Layout.rightMargin: 8
|
||||||
|
|
||||||
|
id: replyControl
|
||||||
|
|
||||||
padding: 4
|
padding: 4
|
||||||
rightPadding: 12
|
rightPadding: 12
|
||||||
|
|
||||||
@@ -148,6 +153,7 @@ ColumnLayout {
|
|||||||
|
|
||||||
source: replyVisible ? reply.author.avatarMediaId : ""
|
source: replyVisible ? reply.author.avatarMediaId : ""
|
||||||
hint: replyVisible ? reply.author.displayName : "H"
|
hint: replyVisible ? reply.author.displayName : "H"
|
||||||
|
color: replyVisible ? reply.author.color : MPalette.accent
|
||||||
|
|
||||||
RippleEffect {
|
RippleEffect {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
@@ -168,14 +174,14 @@ ColumnLayout {
|
|||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
readOnly: true
|
readOnly: true
|
||||||
wrapMode: Label.Wrap
|
wrapMode: Label.Wrap
|
||||||
selectedTextColor: darkBackground ? "white" : MPalette.accent
|
selectedTextColor: darkBackground ? "white" : replyAuthorColor
|
||||||
selectionColor: darkBackground ? MPalette.accent : "white"
|
selectionColor: darkBackground ? replyAuthorColor : "white"
|
||||||
textFormat: Text.RichText
|
textFormat: Text.RichText
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: replyVisible && sentByMe ? reply.author.color : MPalette.background
|
color: sentByMe ? replyAuthorColor : MPalette.background
|
||||||
radius: 18
|
radius: 18
|
||||||
|
|
||||||
AutoMouseArea {
|
AutoMouseArea {
|
||||||
@@ -205,8 +211,8 @@ ColumnLayout {
|
|||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
readOnly: true
|
readOnly: true
|
||||||
wrapMode: Label.Wrap
|
wrapMode: Label.Wrap
|
||||||
selectedTextColor: darkBackground ? MPalette.accent : "white"
|
selectedTextColor: darkBackground ? authorColor : "white"
|
||||||
selectionColor: darkBackground ? "white" : MPalette.accent
|
selectionColor: darkBackground ? "white" : authorColor
|
||||||
textFormat: Text.RichText
|
textFormat: Text.RichText
|
||||||
|
|
||||||
onLinkActivated: {
|
onLinkActivated: {
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import QtQuick.Layouts 1.12
|
|||||||
import QtQuick.Controls.Material 2.12
|
import QtQuick.Controls.Material 2.12
|
||||||
|
|
||||||
import Spectral.Component 2.0
|
import Spectral.Component 2.0
|
||||||
|
import Spectral.Dialog 2.0
|
||||||
|
import Spectral.Effect 2.0
|
||||||
import Spectral.Setting 0.1
|
import Spectral.Setting 0.1
|
||||||
|
|
||||||
Control {
|
Control {
|
||||||
@@ -30,6 +32,20 @@ Control {
|
|||||||
hint: author.displayName
|
hint: author.displayName
|
||||||
source: author.avatarMediaId
|
source: author.avatarMediaId
|
||||||
color: Qt.darker(author.color, 1.1)
|
color: Qt.darker(author.color, 1.1)
|
||||||
|
|
||||||
|
Component {
|
||||||
|
id: userDetailDialog
|
||||||
|
|
||||||
|
UserDetailDialog {}
|
||||||
|
}
|
||||||
|
|
||||||
|
RippleEffect {
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
circular: true
|
||||||
|
|
||||||
|
onClicked: userDetailDialog.createObject(ApplicationWindow.overlay, {"room": currentRoom, "user": author}).open()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ RowLayout {
|
|||||||
visible: avatarVisible
|
visible: avatarVisible
|
||||||
hint: author.displayName
|
hint: author.displayName
|
||||||
source: author.avatarMediaId
|
source: author.avatarMediaId
|
||||||
|
color: author.color
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: userDetailDialog
|
id: userDetailDialog
|
||||||
|
|||||||
@@ -554,6 +554,7 @@ Item {
|
|||||||
|
|
||||||
source: modelData.avatarMediaId
|
source: modelData.avatarMediaId
|
||||||
hint: modelData.displayName
|
hint: modelData.displayName
|
||||||
|
color: modelData.color
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user