replace MouseArea with TapHandler in panel content, fix chevron double-fire with idempotent expand
This commit is contained in:
parent
5eb6ce6d96
commit
cce695a8c6
2 changed files with 25 additions and 28 deletions
|
|
@ -304,11 +304,10 @@ M.BarSection {
|
|||
font.pixelSize: M.Theme.fontSize + 4
|
||||
font.family: M.Theme.iconFontFamily
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
TapHandler {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
enabled: root.player?.canGoPrevious ?? false
|
||||
onClicked: root.player.previous()
|
||||
onTapped: root.player.previous()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -318,10 +317,9 @@ M.BarSection {
|
|||
font.pixelSize: M.Theme.fontSize + 8
|
||||
font.family: M.Theme.iconFontFamily
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
TapHandler {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: root.player?.togglePlaying()
|
||||
onTapped: root.player?.togglePlaying()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -331,11 +329,10 @@ M.BarSection {
|
|||
font.pixelSize: M.Theme.fontSize + 4
|
||||
font.family: M.Theme.iconFontFamily
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
TapHandler {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
enabled: root.player?.canGoNext ?? false
|
||||
onClicked: root.player.next()
|
||||
onTapped: root.player.next()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -359,7 +356,7 @@ M.BarSection {
|
|||
width: _pLabel.implicitWidth + 12
|
||||
height: 18
|
||||
radius: 9
|
||||
color: _active ? M.Theme.base02 : (pArea.containsMouse ? M.Theme.base02 : "transparent")
|
||||
color: _active ? M.Theme.base02 : (pHover.hovered ? M.Theme.base02 : "transparent")
|
||||
border.color: _active ? root.accentColor : M.Theme.base03
|
||||
border.width: _active ? 1 : 0
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
|
@ -374,12 +371,13 @@ M.BarSection {
|
|||
font.bold: _active
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: pArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
HoverHandler {
|
||||
id: pHover
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: root._playerIdx = index
|
||||
}
|
||||
|
||||
TapHandler {
|
||||
onTapped: root._playerIdx = index
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue