diff options
author | q234rty <q23456yuiop@gmail.com> | 2024-02-15 22:57:07 +0800 |
---|---|---|
committer | q234rty <q23456yuiop@gmail.com> | 2024-02-16 16:57:31 +0800 |
commit | 7b07548b773bcb601f0af21d49a3ec393dddb26e (patch) | |
tree | 25a7c1434b64f7f38d3cd939df0361da577487d8 /resources/qml/Avatar.qml | |
parent | Try to fix the blurry encryption indicator on high dpi (diff) | |
download | nheko-7b07548b773bcb601f0af21d49a3ec393dddb26e.tar.xz |
HiDPI Fixes
Fix various downscaled icons by removing undeeded multiplications by devicePixelRatio in sourceSize. Fix downscaled PL indicator in the timeline by using the actual size as sourceSize. Fix various blurry icons by specifying sourceSize.
Diffstat (limited to 'resources/qml/Avatar.qml')
-rw-r--r-- | resources/qml/Avatar.qml | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/resources/qml/Avatar.qml b/resources/qml/Avatar.qml index a248114d..6217d70a 100644 --- a/resources/qml/Avatar.qml +++ b/resources/qml/Avatar.qml @@ -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 |