More linter fixes

pull/1500/head
Nicolas Werner 1 year ago
parent c6ec4b8ba4
commit 95406b9c22
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
  1. 12
      resources/qml/Avatar.qml
  2. 5
      resources/qml/ImageButton.qml
  3. 1
      resources/qml/MatrixText.qml
  4. 1
      resources/qml/Root.qml
  5. 3
      resources/qml/TimelineView.qml
  6. 1
      resources/qml/pages/UserSettingsPage.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();
}

@ -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

@ -1,6 +1,7 @@
// SPDX-FileCopyrightText: Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later
pragma ComponentBehavior: Bound
import ".."
import "../ui"

Loading…
Cancel
Save