Skip to content

Commit

Permalink
chore: replace rectangle in IconItemDelegate to ToolButton
Browse files Browse the repository at this point in the history
替换 IconItemDelegate 中的 Rectangle 为 ToolButton,以使用它的
hover 效果。

Issue: linuxdeepin/developer-center#6140
Log:
  • Loading branch information
BLumia committed Nov 12, 2023
1 parent 880d403 commit a1e8b26
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions qml/IconItemDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,9 @@ Control {
signal itemClicked()
signal menuTriggered()

contentItem: Rectangle {
// anchors.fill: parent
color: (stylus.hovered/* || parent.focus */) ? Qt.rgba(0, 0, 0, 0.3) : "transparent"
radius: 18

Behavior on color { PropertyAnimation {} }

Column {
contentItem: ToolButton {
focusPolicy: Qt.NoFocus
contentItem: Column {
anchors.fill: parent

Item {
Expand Down

0 comments on commit a1e8b26

Please sign in to comment.