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