diff --git a/resources/qml/Avatar.qml b/resources/qml/Avatar.qml
index 39061d2b..034f8575 100644
--- a/resources/qml/Avatar.qml
+++ b/resources/qml/Avatar.qml
@@ -37,7 +37,7 @@ AbstractButton {
enabled: false
font.pixelSize: avatar.height / 2
horizontalAlignment: Text.AlignHCenter
- text: TimelineManager.escapeEmoji(displayName ? String.fromCodePoint(displayName.codePointAt(0)) : "")
+ text: TimelineManager.escapeEmoji(avatar.displayName ? String.fromCodePoint(avatar.displayName.codePointAt(0)) : "")
textFormat: Text.RichText
verticalAlignment: Text.AlignVCenter
visible: img.status != Image.Ready && !Settings.useIdenticon
@@ -46,7 +46,7 @@ AbstractButton {
id: identicon
anchors.fill: parent
- source: Settings.useIdenticon ? ("image://jdenticon/" + (userid !== "" ? userid : roomid) + "?radius=" + (Settings.avatarCircles ? 100 : 25)) : ""
+ source: Settings.useIdenticon ? ("image://jdenticon/" + (avatar.userid !== "" ? avatar.userid : avatar.roomid) + "?radius=" + (Settings.avatarCircles ? 100 : 25)) : ""
visible: Settings.useIdenticon && img.status != Image.Ready
}
Image {
@@ -62,7 +62,7 @@ AbstractButton {
} else if (avatar.url.startsWith('image://')) {
return avatar.url + "?radius=" + (Settings.avatarCircles ? 100 : 25) + ((avatar.crop) ? "" : "&scale");
} else if (avatar.url.startsWith(':/')) {
- return "image://colorimage/" + avatar.url + "?" + textColor;
+ return "image://colorimage/" + avatar.url + "?" + label.color;
} else {
return "";
}
@@ -73,7 +73,7 @@ AbstractButton {
id: onlineIndicator
function updatePresence() {
- switch (Presence.userPresence(userid)) {
+ switch (Presence.userPresence(avatar.userid)) {
case "online":
return Nheko.theme.online;
case "unavailable":
@@ -90,12 +90,12 @@ AbstractButton {
color: updatePresence()
height: avatar.height / 6
radius: Settings.avatarCircles ? height / 2 : height / 8
- visible: !!userid
+ visible: !!avatar.userid
width: height
Connections {
function onPresenceChanged(id) {
- if (id == userid)
+ if (id == avatar.userid)
onlineIndicator.color = onlineIndicator.updatePresence();
}
diff --git a/resources/qml/ImageButton.qml b/resources/qml/ImageButton.qml
index e2e1b914..84967ddb 100644
--- a/resources/qml/ImageButton.qml
+++ b/resources/qml/ImageButton.qml
@@ -2,6 +2,7 @@
//
// SPDX-License-Identifier: GPL-3.0-or-later
+pragma ComponentBehavior
import "./ui"
import QtQuick 2.3
import QtQuick.Controls 2.3
@@ -27,7 +28,7 @@ AbstractButton {
// Workaround, can't get icon.source working for now...
anchors.fill: parent
fillMode: Image.PreserveAspectFit
- source: image != "" ? ("image://colorimage/" + image + "?" + ((button.hovered && changeColorOnHover) ? highlightColor : buttonTextColor)) : ""
+ source: button.image != "" ? ("image://colorimage/" + button.image + "?" + ((button.hovered && button.changeColorOnHover) ? button.highlightColor : button.buttonTextColor)) : ""
sourceSize.height: button.height
sourceSize.width: button.width
}
@@ -38,7 +39,7 @@ AbstractButton {
cursorShape: Qt.PointingHandCursor
}
Ripple {
- color: Qt.rgba(buttonTextColor.r, buttonTextColor.g, buttonTextColor.b, 0.5)
+ color: Qt.rgba(button.buttonTextColor.r, button.buttonTextColor.g, button.buttonTextColor.b, 0.5)
enabled: button.ripple
}
}
diff --git a/resources/qml/MatrixText.qml b/resources/qml/MatrixText.qml
index be183d53..94b8bb98 100644
--- a/resources/qml/MatrixText.qml
+++ b/resources/qml/MatrixText.qml
@@ -39,7 +39,6 @@ TextEdit {
}
onLinkActivated: Nheko.openLink(link)
-
//// propagate events up
//onPressAndHold: (event) => event.accepted = false
//onPressed: (event) => event.accepted = (event.button == Qt.LeftButton)
diff --git a/resources/qml/Root.qml b/resources/qml/Root.qml
index 2880a0c7..e26b386a 100644
--- a/resources/qml/Root.qml
+++ b/resources/qml/Root.qml
@@ -98,6 +98,7 @@ Pane {
}
RoomDirectoryModel {
id: publicRooms
+
}
Component {
id: readReceiptsDialog
diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml
index 5528bd98..bbcf2366 100644
--- a/resources/qml/TimelineView.qml
+++ b/resources/qml/TimelineView.qml
@@ -367,9 +367,8 @@ Item {
TimelineEffects {
id: timelineEffects
- shouldEffectsRun: timelineView.shouldEffectsRun
-
anchors.fill: parent
+ shouldEffectsRun: timelineView.shouldEffectsRun
}
NhekoDropArea {
anchors.fill: parent
diff --git a/resources/qml/pages/UserSettingsPage.qml b/resources/qml/pages/UserSettingsPage.qml
index 0a3f5e52..f23095b6 100644
--- a/resources/qml/pages/UserSettingsPage.qml
+++ b/resources/qml/pages/UserSettingsPage.qml
@@ -1,6 +1,7 @@
// SPDX-FileCopyrightText: Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later
+
pragma ComponentBehavior: Bound
import ".."
import "../ui"
|