fix flyouts
This commit is contained in:
parent
99f71f858d
commit
bc3a85d18d
6 changed files with 8 additions and 16 deletions
|
|
@ -1,5 +1,4 @@
|
|||
import QtQuick
|
||||
import Quickshell
|
||||
import "." as M
|
||||
|
||||
Text {
|
||||
|
|
@ -16,10 +15,8 @@ Text {
|
|||
HoverHandler {
|
||||
onHoveredChanged: {
|
||||
if (hovered && root.tooltip !== "") {
|
||||
const win = QsWindow.window
|
||||
M.FlyoutState.text = root.tooltip
|
||||
M.FlyoutState.itemX = root.mapToItem(win, root.width / 2, 0).x
|
||||
M.FlyoutState.screen = win?.screen ?? null
|
||||
M.FlyoutState.itemX = root.mapToGlobal(root.width / 2, 0).x
|
||||
M.FlyoutState.visible = true
|
||||
} else if (!hovered && root.tooltip !== "") {
|
||||
M.FlyoutState.visible = false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue