forked from openkylin/ukui-menu
添加最近文件按键导航
This commit is contained in:
parent
ab25831aab
commit
bb1f13c41a
|
@ -35,7 +35,6 @@ UkuiMenuExtension {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
onContainsMouseChanged: {
|
onContainsMouseChanged: {
|
||||||
|
|
||||||
if (containsMouse) {
|
if (containsMouse) {
|
||||||
scrollBar.visible = true
|
scrollBar.visible = true
|
||||||
}
|
}
|
||||||
|
@ -59,6 +58,11 @@ UkuiMenuExtension {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.leftMargin: 12
|
anchors.leftMargin: 12
|
||||||
spacing: 4
|
spacing: 4
|
||||||
|
focus: true
|
||||||
|
highlightMoveDuration: 0
|
||||||
|
onActiveFocusChanged: currentIndex = 0
|
||||||
|
onCountChanged: currentIndex = 0
|
||||||
|
keyNavigationWraps: true
|
||||||
|
|
||||||
ScrollBar.vertical: AppControls2.ScrollBar {
|
ScrollBar.vertical: AppControls2.ScrollBar {
|
||||||
id: scrollBar
|
id: scrollBar
|
||||||
|
@ -68,11 +72,21 @@ UkuiMenuExtension {
|
||||||
}
|
}
|
||||||
|
|
||||||
delegate: AppControls2.StyleBackground {
|
delegate: AppControls2.StyleBackground {
|
||||||
|
id: delegateItem
|
||||||
width: ListView.view.width - 18
|
width: ListView.view.width - 18
|
||||||
height: 40
|
height: 40
|
||||||
useStyleTransparent: false
|
useStyleTransparent: false
|
||||||
alpha: itemArea.pressed ? 1 : itemArea.hovered ? 0.65 : 0
|
alpha: itemArea.pressed ? 1 : itemArea.hovered ? 0.65 : 0
|
||||||
radius: 8
|
radius: 8
|
||||||
|
focus: true
|
||||||
|
|
||||||
|
states: State {
|
||||||
|
when: delegateItem.activeFocus
|
||||||
|
PropertyChanges {
|
||||||
|
target: delegateItem
|
||||||
|
alpha: 0.65
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
Loading…
Reference in New Issue