mirror of
https://github.com/belsabbagh/dotfiles.git
synced 2026-04-11 09:36:46 +00:00
16 lines
388 B
QML
16 lines
388 B
QML
pragma Singleton
|
|
import Quickshell
|
|
import QtQuick
|
|
import qs.services
|
|
|
|
Singleton {
|
|
// Prefer Compositor scales because niri and hyprland have diffrent scaling factors
|
|
function scaledWidth(ratio) {
|
|
return Compositor.screenW * ratio / Compositor.screenScale
|
|
}
|
|
|
|
function scaledHeight(ratio) {
|
|
return Compositor.screenH * ratio / Compositor.screenScale
|
|
}
|
|
}
|