forked from Shinonome/dots-hyprland
screenshot: fix window/layer positions for offset monitors (#1539)
This commit is contained in:
@@ -89,6 +89,8 @@ ShellRoot {
|
|||||||
required property var modelData
|
required property var modelData
|
||||||
readonly property HyprlandMonitor hyprlandMonitor: Hyprland.monitorFor(modelData)
|
readonly property HyprlandMonitor hyprlandMonitor: Hyprland.monitorFor(modelData)
|
||||||
readonly property real monitorScale: hyprlandMonitor.scale
|
readonly property real monitorScale: hyprlandMonitor.scale
|
||||||
|
readonly property real monitorOffsetX: hyprlandMonitor.x
|
||||||
|
readonly property real monitorOffsetY: hyprlandMonitor.y
|
||||||
property int activeWorkspaceId: hyprlandMonitor.activeWorkspace?.id ?? 0
|
property int activeWorkspaceId: hyprlandMonitor.activeWorkspace?.id ?? 0
|
||||||
property string screenshotPath: `${root.screenshotDir}/image-${modelData.name}`
|
property string screenshotPath: `${root.screenshotDir}/image-${modelData.name}`
|
||||||
property real dragStartX: 0
|
property real dragStartX: 0
|
||||||
@@ -437,8 +439,8 @@ ShellRoot {
|
|||||||
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
x: modelData.at[0]
|
x: modelData.at[0] - panelWindow.monitorOffsetX
|
||||||
y: modelData.at[1]
|
y: modelData.at[1] - panelWindow.monitorOffsetY
|
||||||
width: modelData.size[0]
|
width: modelData.size[0]
|
||||||
height: modelData.size[1]
|
height: modelData.size[1]
|
||||||
borderColor: root.windowBorderColor
|
borderColor: root.windowBorderColor
|
||||||
@@ -468,8 +470,8 @@ ShellRoot {
|
|||||||
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
x: modelData.at[0]
|
x: modelData.at[0] - panelWindow.monitorOffsetX
|
||||||
y: modelData.at[1]
|
y: modelData.at[1] - panelWindow.monitorOffsetY
|
||||||
width: modelData.size[0]
|
width: modelData.size[0]
|
||||||
height: modelData.size[1]
|
height: modelData.size[1]
|
||||||
borderColor: root.windowBorderColor
|
borderColor: root.windowBorderColor
|
||||||
|
|||||||
Reference in New Issue
Block a user