mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-28 23:42:51 -05:00
ignore compositor scales when QT DPI is overwritten
This commit is contained in:
@@ -29,6 +29,7 @@ Singleton {
|
|||||||
property bool _hasRefreshedOnce: false
|
property bool _hasRefreshedOnce: false
|
||||||
|
|
||||||
property var _coordCache: ({})
|
property var _coordCache: ({})
|
||||||
|
readonly property bool _qtDpiOverridden: Quickshell.env("QT_WAYLAND_FORCE_DPI") !== ""
|
||||||
property int _refreshCount: 0
|
property int _refreshCount: 0
|
||||||
property real _refreshWindowStart: 0
|
property real _refreshWindowStart: 0
|
||||||
readonly property int _maxRefreshesPerSecond: 3
|
readonly property int _maxRefreshesPerSecond: 3
|
||||||
@@ -36,6 +37,10 @@ Singleton {
|
|||||||
function getScreenScale(screen) {
|
function getScreenScale(screen) {
|
||||||
if (!screen) return 1
|
if (!screen) return 1
|
||||||
|
|
||||||
|
if (_qtDpiOverridden) {
|
||||||
|
return screen.devicePixelRatio || 1
|
||||||
|
}
|
||||||
|
|
||||||
if (isNiri && screen) {
|
if (isNiri && screen) {
|
||||||
const niriScale = NiriService.displayScales[screen.name]
|
const niriScale = NiriService.displayScales[screen.name]
|
||||||
if (niriScale !== undefined) return niriScale
|
if (niriScale !== undefined) return niriScale
|
||||||
|
|||||||
Reference in New Issue
Block a user