From bb1f13c41a332301581c7edbb51a106786fdd8d7 Mon Sep 17 00:00:00 2001 From: youdiansaodongxi Date: Mon, 29 May 2023 16:22:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9C=80=E8=BF=91=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E6=8C=89=E9=94=AE=E5=AF=BC=E8=88=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../recent-file/qml/RecentFileExtension.qml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/extension/recent-file/qml/RecentFileExtension.qml b/extension/recent-file/qml/RecentFileExtension.qml index 023cbd3..32a0251 100644 --- a/extension/recent-file/qml/RecentFileExtension.qml +++ b/extension/recent-file/qml/RecentFileExtension.qml @@ -35,7 +35,6 @@ UkuiMenuExtension { anchors.fill: parent hoverEnabled: true onContainsMouseChanged: { - if (containsMouse) { scrollBar.visible = true } @@ -59,6 +58,11 @@ UkuiMenuExtension { anchors.fill: parent anchors.leftMargin: 12 spacing: 4 + focus: true + highlightMoveDuration: 0 + onActiveFocusChanged: currentIndex = 0 + onCountChanged: currentIndex = 0 + keyNavigationWraps: true ScrollBar.vertical: AppControls2.ScrollBar { id: scrollBar @@ -68,11 +72,21 @@ UkuiMenuExtension { } delegate: AppControls2.StyleBackground { + id: delegateItem width: ListView.view.width - 18 height: 40 useStyleTransparent: false alpha: itemArea.pressed ? 1 : itemArea.hovered ? 0.65 : 0 radius: 8 + focus: true + + states: State { + when: delegateItem.activeFocus + PropertyChanges { + target: delegateItem + alpha: 0.65 + } + } Row { anchors.fill: parent