replace MouseArea with HoverHandler+TapHandler in BT/network menu delegates
This commit is contained in:
parent
6eb36b86c9
commit
1184cdd488
2 changed files with 24 additions and 24 deletions
|
|
@ -73,7 +73,7 @@ M.HoverPanel {
|
|||
anchors.fill: parent
|
||||
anchors.leftMargin: 4
|
||||
anchors.rightMargin: 4
|
||||
color: btHeaderArea.containsMouse ? M.Theme.base02 : "transparent"
|
||||
color: btHeaderHover.hovered ? M.Theme.base02 : "transparent"
|
||||
radius: M.Theme.radius
|
||||
}
|
||||
|
||||
|
|
@ -109,12 +109,12 @@ M.HoverPanel {
|
|||
font.family: M.Theme.iconFontFamily
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: btHeaderArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
HoverHandler {
|
||||
id: btHeaderHover
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
}
|
||||
TapHandler {
|
||||
onTapped: {
|
||||
powerProc._action = menuWindow._btEnabled ? "off" : "on";
|
||||
powerProc.running = true;
|
||||
}
|
||||
|
|
@ -143,7 +143,7 @@ M.HoverPanel {
|
|||
anchors.fill: parent
|
||||
anchors.leftMargin: 4
|
||||
anchors.rightMargin: 4
|
||||
color: entryArea.containsMouse ? M.Theme.base02 : "transparent"
|
||||
color: entryHover.hovered ? M.Theme.base02 : "transparent"
|
||||
radius: M.Theme.radius
|
||||
}
|
||||
|
||||
|
|
@ -184,12 +184,12 @@ M.HoverPanel {
|
|||
width: entry.modelData.battery >= 0 ? implicitWidth : 0
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: entryArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
HoverHandler {
|
||||
id: entryHover
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
}
|
||||
TapHandler {
|
||||
onTapped: {
|
||||
toggleProc.action = entry.modelData.connected ? "disconnect" : "connect";
|
||||
toggleProc.mac = entry.modelData.mac;
|
||||
toggleProc.running = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue