Init rewritten avatar.

This commit is contained in:
Black Hat
2018-11-04 19:14:02 +08:00
parent c19f49a898
commit 5a46810016
24 changed files with 167 additions and 101 deletions

View File

@@ -35,7 +35,7 @@ RowLayout {
round: false
visible: avatarVisible
hint: author.displayName
image: author.avatar
source: author.paintable
}
Rectangle {
@@ -142,7 +142,7 @@ RowLayout {
height: parent.height
hint: modelData.displayName
image: modelData.avatar
source: modelData.paintable
MouseArea {
anchors.fill: parent

View File

@@ -27,7 +27,7 @@ Column {
height: parent.height
hint: user.displayName
image: user.avatar
source: user.paintable
}
ColumnLayout {

View File

@@ -33,7 +33,7 @@ Drawer {
Layout.alignment: Qt.AlignHCenter
hint: room ? room.displayName : "No name"
image: spectralController.safeImage(room ? room.avatar : null)
source: room ? room.paintable : null
}
Label {
@@ -131,7 +131,7 @@ Drawer {
Layout.preferredWidth: height
Layout.fillHeight: true
image: avatar
source: paintable
hint: name
}

View File

@@ -6,7 +6,7 @@ import QtQuick.Controls.Material 2.2
import Spectral 0.1
Rectangle {
property alias image: headerImage.image
property alias paintable: headerImage.source
property alias topic: headerTopicLabel.text
signal clicked()
@@ -33,6 +33,7 @@ Rectangle {
id: headerImage
source: currentRoom.paintable
hint: currentRoom ? currentRoom.displayName : "No name"
}

View File

@@ -66,9 +66,8 @@ Rectangle {
Layout.preferredWidth: height
Layout.fillHeight: true
source: paintable
hint: name || "No Name"
image: avatar
}
ColumnLayout {

View File

@@ -1,7 +1,7 @@
import QtQuick 2.9
RoomPanelForm {
roomHeader.image: spectralController.safeImage(currentRoom ? currentRoom.avatar : null)
roomHeader.paintable: currentRoom ? currentRoom.paintable : null
roomHeader.topic: currentRoom ? (currentRoom.topic).replace(/(\r\n\t|\n|\r\t)/gm,"") : ""
roomHeader.onClicked: roomDrawer.open()

View File

@@ -272,7 +272,7 @@ Item {
Layout.preferredWidth: height
Layout.fillHeight: true
image: modelData.avatar
source: modelData.paintable
hint: modelData.displayName
}

View File

@@ -82,7 +82,7 @@ Rectangle {
width: parent.height
height: parent.height
visible: !isEmoji
image: spectralController.safeImage(modelData.avatar)
source: modelData.paintable
}
Label {
height: parent.height