mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 12:38:48 +03:00
More linter fixes
This commit is contained in:
parent
c6ec4b8ba4
commit
95406b9c22
6 changed files with 12 additions and 11 deletions
|
@ -37,7 +37,7 @@ AbstractButton {
|
||||||
enabled: false
|
enabled: false
|
||||||
font.pixelSize: avatar.height / 2
|
font.pixelSize: avatar.height / 2
|
||||||
horizontalAlignment: Text.AlignHCenter
|
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
|
textFormat: Text.RichText
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
visible: img.status != Image.Ready && !Settings.useIdenticon
|
visible: img.status != Image.Ready && !Settings.useIdenticon
|
||||||
|
@ -46,7 +46,7 @@ AbstractButton {
|
||||||
id: identicon
|
id: identicon
|
||||||
|
|
||||||
anchors.fill: parent
|
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
|
visible: Settings.useIdenticon && img.status != Image.Ready
|
||||||
}
|
}
|
||||||
Image {
|
Image {
|
||||||
|
@ -62,7 +62,7 @@ AbstractButton {
|
||||||
} else if (avatar.url.startsWith('image://')) {
|
} else if (avatar.url.startsWith('image://')) {
|
||||||
return avatar.url + "?radius=" + (Settings.avatarCircles ? 100 : 25) + ((avatar.crop) ? "" : "&scale");
|
return avatar.url + "?radius=" + (Settings.avatarCircles ? 100 : 25) + ((avatar.crop) ? "" : "&scale");
|
||||||
} else if (avatar.url.startsWith(':/')) {
|
} else if (avatar.url.startsWith(':/')) {
|
||||||
return "image://colorimage/" + avatar.url + "?" + textColor;
|
return "image://colorimage/" + avatar.url + "?" + label.color;
|
||||||
} else {
|
} else {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ AbstractButton {
|
||||||
id: onlineIndicator
|
id: onlineIndicator
|
||||||
|
|
||||||
function updatePresence() {
|
function updatePresence() {
|
||||||
switch (Presence.userPresence(userid)) {
|
switch (Presence.userPresence(avatar.userid)) {
|
||||||
case "online":
|
case "online":
|
||||||
return Nheko.theme.online;
|
return Nheko.theme.online;
|
||||||
case "unavailable":
|
case "unavailable":
|
||||||
|
@ -90,12 +90,12 @@ AbstractButton {
|
||||||
color: updatePresence()
|
color: updatePresence()
|
||||||
height: avatar.height / 6
|
height: avatar.height / 6
|
||||||
radius: Settings.avatarCircles ? height / 2 : height / 8
|
radius: Settings.avatarCircles ? height / 2 : height / 8
|
||||||
visible: !!userid
|
visible: !!avatar.userid
|
||||||
width: height
|
width: height
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
function onPresenceChanged(id) {
|
function onPresenceChanged(id) {
|
||||||
if (id == userid)
|
if (id == avatar.userid)
|
||||||
onlineIndicator.color = onlineIndicator.updatePresence();
|
onlineIndicator.color = onlineIndicator.updatePresence();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
pragma ComponentBehavior
|
||||||
import "./ui"
|
import "./ui"
|
||||||
import QtQuick 2.3
|
import QtQuick 2.3
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
|
@ -27,7 +28,7 @@ AbstractButton {
|
||||||
// Workaround, can't get icon.source working for now...
|
// Workaround, can't get icon.source working for now...
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
fillMode: Image.PreserveAspectFit
|
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.height: button.height
|
||||||
sourceSize.width: button.width
|
sourceSize.width: button.width
|
||||||
}
|
}
|
||||||
|
@ -38,7 +39,7 @@ AbstractButton {
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
}
|
}
|
||||||
Ripple {
|
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
|
enabled: button.ripple
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,6 @@ TextEdit {
|
||||||
}
|
}
|
||||||
onLinkActivated: Nheko.openLink(link)
|
onLinkActivated: Nheko.openLink(link)
|
||||||
|
|
||||||
|
|
||||||
//// propagate events up
|
//// propagate events up
|
||||||
//onPressAndHold: (event) => event.accepted = false
|
//onPressAndHold: (event) => event.accepted = false
|
||||||
//onPressed: (event) => event.accepted = (event.button == Qt.LeftButton)
|
//onPressed: (event) => event.accepted = (event.button == Qt.LeftButton)
|
||||||
|
|
|
@ -98,6 +98,7 @@ Pane {
|
||||||
}
|
}
|
||||||
RoomDirectoryModel {
|
RoomDirectoryModel {
|
||||||
id: publicRooms
|
id: publicRooms
|
||||||
|
|
||||||
}
|
}
|
||||||
Component {
|
Component {
|
||||||
id: readReceiptsDialog
|
id: readReceiptsDialog
|
||||||
|
|
|
@ -367,9 +367,8 @@ Item {
|
||||||
TimelineEffects {
|
TimelineEffects {
|
||||||
id: timelineEffects
|
id: timelineEffects
|
||||||
|
|
||||||
shouldEffectsRun: timelineView.shouldEffectsRun
|
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
shouldEffectsRun: timelineView.shouldEffectsRun
|
||||||
}
|
}
|
||||||
NhekoDropArea {
|
NhekoDropArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
// SPDX-FileCopyrightText: Nheko Contributors
|
// SPDX-FileCopyrightText: Nheko Contributors
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
pragma ComponentBehavior: Bound
|
pragma ComponentBehavior: Bound
|
||||||
import ".."
|
import ".."
|
||||||
import "../ui"
|
import "../ui"
|
||||||
|
|
Loading…
Reference in a new issue