Skip to content
Snippets Groups Projects
Verified Commit 95406b9c authored by Nicolas Werner's avatar Nicolas Werner
Browse files

More linter fixes

parent c6ec4b8b
No related branches found
No related tags found
No related merge requests found
Pipeline #4932 failed
......@@ -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();
}
......
......@@ -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
}
}
......@@ -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)
......
......@@ -98,6 +98,7 @@ Pane {
}
RoomDirectoryModel {
id: publicRooms
}
Component {
id: readReceiptsDialog
......
......@@ -367,9 +367,8 @@ Item {
TimelineEffects {
id: timelineEffects
shouldEffectsRun: timelineView.shouldEffectsRun
anchors.fill: parent
shouldEffectsRun: timelineView.shouldEffectsRun
}
NhekoDropArea {
anchors.fill: parent
......
// SPDX-FileCopyrightText: Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later
pragma ComponentBehavior: Bound
import ".."
import "../ui"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment