diff options
| author | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2026-05-25 13:55:19 +0300 |
|---|---|---|
| committer | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2026-05-25 13:55:19 +0300 |
| commit | 3fd4f41cd306ee97aaf47400fba75cc874048215 (patch) | |
| tree | 6c60d274e67e90b3a44ac1c8c476a91274beb962 /src/quicknativestyle/util/FocusFrame.qml | |
| parent | 22032227d16c39211e2ebceef97d21f4d89c7c87 (diff) | |
| parent | 94cf5162f8817fb7883ad56ac704e752e5dab5a4 (diff) | |
Merge tag 'v6.5.9-lts' into tqtc/lts-6.5-opensourcev6.5.9-lts-lgpl
Qt 6.5.9-lts release
Conflicts solved:
dependencies.yaml
Change-Id: I6f892bad653449a1dd0e0c6e66cc74eee8657cda
Diffstat (limited to 'src/quicknativestyle/util/FocusFrame.qml')
| -rw-r--r-- | src/quicknativestyle/util/FocusFrame.qml | 37 |
1 files changed, 13 insertions, 24 deletions
diff --git a/src/quicknativestyle/util/FocusFrame.qml b/src/quicknativestyle/util/FocusFrame.qml index eebee62c31..2a6ca12bed 100644 --- a/src/quicknativestyle/util/FocusFrame.qml +++ b/src/quicknativestyle/util/FocusFrame.qml @@ -5,24 +5,15 @@ import QtQuick import QtQuick.Controls import QtQuick.Layouts -Item { +Rectangle { id: root - // It's important that this item has a zero size. Otherwise, if the parent of the - // targetItem is e.g a layout, we will change the layout if we parent this item inside it. - width: 0 - height: 0 - // Stack on top of all siblings of the targetItem - z: 100 - function moveToItem(item, margins, radius) { if (!item) { targetItem = null; parent = null; - visible = false; return; } - visible = true parent = item.parent targetItem = item leftOffset = margins.left @@ -45,20 +36,18 @@ Item { // systemFrameColor is set to NSColor.keyboardFocusIndicatorColor from cpp property color systemFrameColor - Rectangle { - id: focusFrame - z: 10 - x: targetItem ? targetItem.x + leftOffset - frameSize - root.x : 0 - y: targetItem ? targetItem.y + topOffset - frameSize - root.y : 0 - width: targetItem ? targetItem.width - leftOffset - rightOffset + (frameSize * 2) : 0 - height: targetItem ? targetItem.height - topOffset - bottomOffset + (frameSize * 2) : 0 - radius: frameRadius - visible: targetItem && targetItem.visible - color: "transparent" + x: targetItem ? targetItem.x + leftOffset - frameSize : 0 + y: targetItem ? targetItem.y + topOffset - frameSize : 0 + // Stack on top of all siblings of the targetItem + z: 100 + width: targetItem ? targetItem.width - leftOffset - rightOffset + (frameSize * 2) : 0 + height: targetItem ? targetItem.height - topOffset - bottomOffset + (frameSize * 2) : 0 + radius: frameRadius + visible: targetItem && targetItem.visible + color: "transparent" - border.color: systemFrameColor - border.width: frameSize - } + border.color: systemFrameColor + border.width: frameSize ParallelAnimation { id: animation @@ -71,7 +60,7 @@ Item { easing.type: Easing.OutCubic } NumberAnimation { - target: focusFrame + target: root property: "opacity" duration: 300 from: 0 |
