mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Multiply source size by scale factor
Might be unnecessary, but docs are unclear on that.
This commit is contained in:
parent
9b9d4bec70
commit
a0699f5247
7 changed files with 20 additions and 16 deletions
|
@ -5,6 +5,7 @@
|
|||
import "./ui"
|
||||
import QtQuick 2.6
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Window 2.15
|
||||
import im.nheko 1.0
|
||||
|
||||
Rectangle {
|
||||
|
@ -67,8 +68,8 @@ Rectangle {
|
|||
fillMode: avatar.crop ? Image.PreserveAspectCrop : Image.PreserveAspectFit
|
||||
mipmap: true
|
||||
smooth: true
|
||||
sourceSize.width: avatar.width
|
||||
sourceSize.height: avatar.height
|
||||
sourceSize.width: avatar.width * Screen.devicePixelRatio
|
||||
sourceSize.height: avatar.height * Screen.devicePixelRatio
|
||||
source: avatar.url ? (avatar.url + "?radius=" + (Settings.avatarCircles ? 100 : 25) + ((avatar.crop) ? "" : "&scale")) : ""
|
||||
|
||||
MouseArea {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.1
|
||||
import QtQuick.Window 2.15
|
||||
import im.nheko 1.0
|
||||
|
||||
Image {
|
||||
|
@ -30,8 +31,8 @@ Image {
|
|||
|
||||
width: 16
|
||||
height: 16
|
||||
sourceSize.height: height
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height * Screen.devicePixelRatio
|
||||
sourceSize.width: width * Screen.devicePixelRatio
|
||||
source: {
|
||||
if (encrypted) {
|
||||
switch (trust) {
|
||||
|
|
|
@ -167,8 +167,8 @@ Item {
|
|||
Layout.preferredWidth: 16
|
||||
height: 16
|
||||
width: 16
|
||||
sourceSize.width: 16
|
||||
sourceSize.height: 16
|
||||
sourceSize.width: 16 * Screen.devicePixelRatio
|
||||
sourceSize.height: 16 * Screen.devicePixelRatio
|
||||
source: "image://colorimage/:/icons/icons/ui/edit.svg?" + ((eventId == chat.model.edit) ? Nheko.colors.highlight : Nheko.colors.buttonText)
|
||||
ToolTip.visible: editHovered.hovered
|
||||
ToolTip.text: qsTr("Edited")
|
||||
|
|
|
@ -6,6 +6,7 @@ import Qt.labs.platform 1.1 as Platform
|
|||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Layouts 1.2
|
||||
import QtQuick.Window 2.15
|
||||
import im.nheko 1.0
|
||||
|
||||
import "./delegates"
|
||||
|
@ -133,8 +134,8 @@ Rectangle {
|
|||
Layout.rowSpan: 2
|
||||
Layout.preferredHeight: Nheko.avatarSize - Nheko.paddingMedium
|
||||
Layout.preferredWidth: Nheko.avatarSize - Nheko.paddingMedium
|
||||
sourceSize.height: Layout.preferredHeight
|
||||
sourceSize.width: Layout.preferredWidth
|
||||
sourceSize.height: Layout.preferredHeight * Screen.devicePixelRatio
|
||||
sourceSize.width: Layout.preferredWidth * Screen.devicePixelRatio
|
||||
visible: isEncrypted
|
||||
encrypted: isEncrypted
|
||||
trust: trustlevel
|
||||
|
|
|
@ -32,8 +32,8 @@ Item {
|
|||
source: blurhash ? ("image://blurhash/" + blurhash) : ("image://colorimage/:/icons/icons/ui/image-failed.svg?" + Nheko.colors.buttonText)
|
||||
asynchronous: true
|
||||
fillMode: Image.PreserveAspectFit
|
||||
sourceSize.width: parent.width
|
||||
sourceSize.height: parent.height
|
||||
sourceSize.width: parent.width * Screen.devicePixelRatio
|
||||
sourceSize.height: parent.height * Screen.devicePixelRatio
|
||||
}
|
||||
|
||||
Image {
|
||||
|
@ -47,8 +47,8 @@ Item {
|
|||
smooth: true
|
||||
mipmap: true
|
||||
|
||||
sourceSize.width: Math.min(Screen.desktopAvailableWidth, originalWidth || undefined)
|
||||
sourceSize.height: Math.min(Screen.desktopAvailableHeight, originalWidth*proportionalHeight || undefined)
|
||||
sourceSize.width: Math.min(Screen.desktopAvailableWidth, originalWidth || undefined) * Screen.devicePixelRatio
|
||||
sourceSize.height: Math.min(Screen.desktopAvailableHeight, originalWidth*proportionalHeight || undefined) * Screen.devicePixelRatio
|
||||
}
|
||||
|
||||
MxcAnimatedImage {
|
||||
|
|
|
@ -305,8 +305,8 @@ ApplicationWindow {
|
|||
Layout.preferredHeight: 16
|
||||
Layout.preferredWidth: 16
|
||||
visible: profile.isSelf && verificationStatus != VerificationStatus.NOT_APPLICABLE
|
||||
sourceSize.height: 16
|
||||
sourceSize.width: 16
|
||||
sourceSize.height: 16 * Screen.devicePixelRatio
|
||||
sourceSize.width: 16 * Screen.devicePixelRatio
|
||||
source: {
|
||||
switch (verificationStatus) {
|
||||
case VerificationStatus.VERIFIED:
|
||||
|
|
|
@ -7,6 +7,7 @@ import QtGraphicalEffects 1.0
|
|||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtQuick.Window 2.15
|
||||
import im.nheko 1.0
|
||||
import im.nheko.EmojiModel 1.0
|
||||
|
||||
|
@ -287,8 +288,8 @@ Menu {
|
|||
horizontalAlignment: Image.AlignHCenter
|
||||
verticalAlignment: Image.AlignVCenter
|
||||
fillMode: Image.Pad
|
||||
sourceSize.width: 32
|
||||
sourceSize.height: 32
|
||||
sourceSize.width: 32 * Screen.devicePixelRatio
|
||||
sourceSize.height: 32 * Screen.devicePixelRatio
|
||||
source: "image://colorimage/" + model.image + "?" + (hovered ? Nheko.colors.highlight : Nheko.colors.buttonText)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue