Skip to content

Commit

Permalink
fix(UI): add hover state for AppListView items
Browse files Browse the repository at this point in the history
给小窗口启动器左侧列表视图的项目增加 hover 效果。

Issue: linuxdeepin/developer-center#6205
Log:
  • Loading branch information
BLumia committed Nov 23, 2023
1 parent 9ba5603 commit 49e2d2a
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions qml/WindowedFrame.qml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
import QtQuick.Window 2.15
import org.deepin.dtk 1.0
import org.deepin.dtk.private 1.0 as P

import org.deepin.launchpad 1.0

Expand Down Expand Up @@ -45,8 +46,9 @@ StackView {
text: model.display
checkable: false
icon.name: iconName
width: appListView.width
// icon.source: "image://app-icon/" + iconName;
backgroundVisible: false
ColorSelector.family: Palette.CrystalColor

TapHandler {
acceptedButtons: Qt.RightButton
Expand All @@ -55,17 +57,18 @@ StackView {
}
}

MouseArea {
anchors.fill: parent
acceptedButtons: Qt.LeftButton
onClicked: {
launchApp(desktopId)
}
onClicked: {
launchApp(desktopId)
}

Keys.onReturnPressed: {
launchApp(desktopId)
}

background: P.ButtonPanel {
button: parent
visible: ColorSelector.controlState === DTK.HoveredState
}
}
}

Expand Down

0 comments on commit 49e2d2a

Please sign in to comment.