Port stringToColor to C++.

Fixes #50.
This commit is contained in:
Black Hat
2018-09-16 16:09:36 +08:00
parent 03a8eae491
commit 1e04013e3d
11 changed files with 20 additions and 27 deletions

View File

@@ -11,7 +11,7 @@ Text {
verticalAlignment: Text.AlignVCenter
font.pointSize: 20
font.family: "Noto Color Emoji"
font.family: "Emoji"
MouseArea {
anchors.fill: parent

View File

@@ -37,7 +37,7 @@ Popup {
verticalAlignment: Text.AlignVCenter
font.pointSize: 20
font.family: "Noto Color Emoji"
font.family: "Emoji"
text: modelData
MouseArea {

View File

@@ -31,7 +31,6 @@ RowLayout {
round: false
visible: avatarVisible
hint: author.displayName
defaultColor: Util.stringToColor(author.displayName)
image: author.avatar
}
@@ -106,7 +105,6 @@ RowLayout {
height: parent.height
hint: modelData.displayName
defaultColor: Util.stringToColor(modelData.displayName)
image: modelData.avatar
}
}

View File

@@ -30,7 +30,6 @@ Drawer {
Layout.alignment: Qt.AlignHCenter
hint: room ? room.displayName : "No name"
defaultColor: Util.stringToColor(room ? room.displayName : "No name")
image: matriqueController.safeImage(room ? room.avatar : null)
}
@@ -123,7 +122,6 @@ Drawer {
Layout.preferredWidth: height
Layout.fillHeight: true
defaultColor: Util.stringToColor(name)
image: avatar
hint: name
}