fix hover panel positioning: use contentWidth for margins, pass screen from module context
This commit is contained in:
parent
0fd3c78fb0
commit
ffb869c5cc
4 changed files with 4 additions and 2 deletions
|
|
@ -18,7 +18,6 @@ PanelWindow {
|
|||
|
||||
default property alias content: panelContent.children
|
||||
|
||||
screen: QsWindow.window?.screen ?? null
|
||||
visible: _winVisible
|
||||
color: "transparent"
|
||||
|
||||
|
|
@ -32,7 +31,7 @@ PanelWindow {
|
|||
anchors.left: true
|
||||
|
||||
margins.top: 0
|
||||
margins.left: Math.max(0, Math.min(Math.round(anchorX - implicitWidth / 2), (screen?.width ?? 1920) - implicitWidth))
|
||||
margins.left: Math.max(0, Math.min(Math.round(anchorX - contentWidth / 2), (screen?.width ?? 1920) - contentWidth))
|
||||
|
||||
implicitWidth: panelContent.width
|
||||
implicitHeight: panelContent.height
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue