mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-10-30 09:30:47 +03:00
commit
e7c6701c5f
7 changed files with 34 additions and 16 deletions
|
@ -64,8 +64,16 @@ AbstractButton {
|
|||
} else {
|
||||
return "";
|
||||
}
|
||||
sourceSize.height: avatar.height * Screen.devicePixelRatio
|
||||
sourceSize.width: avatar.width * Screen.devicePixelRatio
|
||||
sourceSize.height: if (!avatar.url.startsWith('image://MxcImage/') && avatar.url.endsWith('.svg')){
|
||||
return avatar.height
|
||||
} else {
|
||||
return avatar.height * Screen.devicePixelRatio
|
||||
}
|
||||
sourceSize.width: if (!avatar.url.startsWith('image://MxcImage/') && avatar.url.endsWith('.svg')){
|
||||
return avatar.width
|
||||
} else {
|
||||
return avatar.width * Screen.devicePixelRatio
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
id: onlineIndicator
|
||||
|
|
|
@ -40,8 +40,8 @@ RowLayout {
|
|||
ToolTip.text: qsTr("Edited")
|
||||
ToolTip.visible: editHovered.hovered
|
||||
source: "image://colorimage/:/icons/icons/ui/edit.svg?" + ((metadata.eventId == metadata.room.edit) ? palette.highlight : palette.buttonText)
|
||||
sourceSize.height: parent.iconSize * Screen.devicePixelRatio
|
||||
sourceSize.width: parent.iconSize * Screen.devicePixelRatio
|
||||
sourceSize.height: parent.iconSize
|
||||
sourceSize.width: parent.iconSize
|
||||
visible: metadata.isEdited || metadata.eventId == metadata.room.edit
|
||||
HoverHandler {
|
||||
id: editHovered
|
||||
|
@ -66,8 +66,8 @@ RowLayout {
|
|||
Layout.preferredHeight: parent.iconSize
|
||||
Layout.preferredWidth: parent.iconSize
|
||||
encrypted: metadata.isEncrypted
|
||||
sourceSize.height: parent.iconSize * Screen.devicePixelRatio
|
||||
sourceSize.width: parent.iconSize * Screen.devicePixelRatio
|
||||
sourceSize.height: parent.iconSize
|
||||
sourceSize.width: parent.iconSize
|
||||
trust: metadata.trustlevel
|
||||
visible: metadata.room.isEncrypted
|
||||
}
|
||||
|
|
|
@ -92,8 +92,8 @@ Column {
|
|||
height: fontMetrics.ascent
|
||||
width: height
|
||||
|
||||
sourceSize.width: fontMetrics.lineSpacing
|
||||
sourceSize.height: fontMetrics.lineSpacing
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
|
||||
permissions: room ? room.permissions : null
|
||||
visible: isAdmin || isModerator
|
||||
|
|
|
@ -141,8 +141,8 @@ AbstractButton {
|
|||
source: blurhash ? ("image://blurhash/" + blurhash) : ("image://colorimage/:/icons/icons/ui/image-failed.svg?" + palette.buttonText)
|
||||
asynchronous: true
|
||||
fillMode: Image.PreserveAspectFit
|
||||
sourceSize.width: parent.width * Screen.devicePixelRatio
|
||||
sourceSize.height: parent.height * Screen.devicePixelRatio
|
||||
sourceSize.width: blurhash ? parent.width * Screen.devicePixelRatio : Math.min(parent.width, parent.height)
|
||||
sourceSize.height: blurhash ? parent.height * Screen.devicePixelRatio : Math.min(parent.width, parent.height)
|
||||
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
|
|
@ -162,6 +162,10 @@ ApplicationWindow {
|
|||
}
|
||||
|
||||
PowerlevelIndicator {
|
||||
Layout.preferredWidth: fontMetrics.lineSpacing * 2
|
||||
Layout.preferredHeight: fontMetrics.lineSpacing * 2
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
powerlevel: model.powerlevel
|
||||
permissions: room.permissions
|
||||
}
|
||||
|
@ -169,8 +173,10 @@ ApplicationWindow {
|
|||
EncryptionIndicator {
|
||||
id: encryptInd
|
||||
|
||||
Layout.preferredWidth: 16
|
||||
Layout.preferredHeight: 16
|
||||
Layout.preferredWidth: fontMetrics.lineSpacing * 2
|
||||
Layout.preferredHeight: fontMetrics.lineSpacing * 2
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
Layout.alignment: Qt.AlignRight
|
||||
visible: room.isEncrypted
|
||||
encrypted: room.isEncrypted
|
||||
|
|
|
@ -232,6 +232,8 @@ ApplicationWindow {
|
|||
EncryptionIndicator {
|
||||
Layout.preferredHeight: 32
|
||||
Layout.preferredWidth: 32
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
encrypted: profile.userVerificationEnabled
|
||||
trust: profile.userVerified
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
|
@ -364,8 +366,8 @@ ApplicationWindow {
|
|||
Layout.preferredHeight: 16
|
||||
Layout.preferredWidth: 16
|
||||
visible: profile.isSelf && verificationStatus != VerificationStatus.NOT_APPLICABLE
|
||||
sourceSize.height: 16 * Screen.devicePixelRatio
|
||||
sourceSize.width: 16 * Screen.devicePixelRatio
|
||||
sourceSize.height: height
|
||||
sourceSize.width: width
|
||||
source: {
|
||||
switch (verificationStatus) {
|
||||
case VerificationStatus.VERIFIED:
|
||||
|
@ -446,6 +448,8 @@ ApplicationWindow {
|
|||
Image {
|
||||
Layout.preferredHeight: 16
|
||||
Layout.preferredWidth: 16
|
||||
sourceSize.height: height
|
||||
sourceSize.width: width
|
||||
visible: !profile.isSelf && verificationStatus != VerificationStatus.NOT_APPLICABLE
|
||||
source: {
|
||||
switch (verificationStatus) {
|
||||
|
|
|
@ -112,8 +112,8 @@ Item {
|
|||
visible: regis.usernameAvailable || regis.usernameUnavailable
|
||||
ToolTip.visible: ma.hovered
|
||||
ToolTip.text: qsTr("Back")
|
||||
sourceSize.height: height * Screen.devicePixelRatio
|
||||
sourceSize.width: width * Screen.devicePixelRatio
|
||||
sourceSize.height: height
|
||||
sourceSize.width: width
|
||||
HoverHandler {
|
||||
id: ma
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue