Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Ottens <kevin.ottens@nextcloud.com>2020-07-06 14:55:14 +0300
committerCamila <smayres@gmail.com>2020-07-06 21:14:57 +0300
commitd3d713ff9c2d884128c5a1e57341d4bf3ab05763 (patch)
treeb9653b434cd7bec4b711eda55c3e5b74f08b4899 /src/gui/tray
parent180f1910149233a3afce2c2c1ae616637ce8f610 (diff)
Fix the hover for the other menu items
Ultimately we would avoid the code duplication by creating our own proper QQC2 style instead of directly tuning everything. That's a battle for another time (more elements would need to be adjusted for that, I don't want to dilute this branch too much). Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Diffstat (limited to 'src/gui/tray')
-rw-r--r--src/gui/tray/UserLine.qml34
-rw-r--r--src/gui/tray/Window.qml44
2 files changed, 76 insertions, 2 deletions
diff --git a/src/gui/tray/UserLine.qml b/src/gui/tray/UserLine.qml
index 706eccb49..a2bedbec3 100644
--- a/src/gui/tray/UserLine.qml
+++ b/src/gui/tray/UserLine.qml
@@ -22,6 +22,7 @@ MenuItem {
Layout.preferredWidth: (userLineLayout.width * (5/6))
Layout.preferredHeight: (userLineLayout.height)
display: AbstractButton.IconOnly
+ hoverEnabled: true
flat: true
MouseArea {
@@ -39,8 +40,15 @@ MenuItem {
}
}
- background: Rectangle {
- color: "transparent"
+
+ background: Item {
+ height: parent.height
+ width: parent.menu.width
+ Rectangle {
+ anchors.fill: parent
+ anchors.margins: 1
+ color: parent.parent.hovered ? Style.lightHover : "transparent"
+ }
}
RowLayout {
@@ -140,19 +148,41 @@ MenuItem {
MenuItem {
text: isConnected ? qsTr("Log out") : qsTr("Log in")
font.pixelSize: Style.topLinePixelSize
+ hoverEnabled: true
onClicked: {
isConnected ? UserModel.logout(index) : UserModel.login(index)
accountMenu.close()
}
+
+ background: Item {
+ height: parent.height
+ width: parent.menu.width
+ Rectangle {
+ anchors.fill: parent
+ anchors.margins: 1
+ color: parent.parent.hovered ? Style.lightHover : "transparent"
+ }
+ }
}
MenuItem {
text: qsTr("Remove Account")
font.pixelSize: Style.topLinePixelSize
+ hoverEnabled: true
onClicked: {
UserModel.removeAccount(index)
accountMenu.close()
}
+
+ background: Item {
+ height: parent.height
+ width: parent.menu.width
+ Rectangle {
+ anchors.fill: parent
+ anchors.margins: 1
+ color: parent.parent.hovered ? Style.lightHover : "transparent"
+ }
+ }
}
}
}
diff --git a/src/gui/tray/Window.qml b/src/gui/tray/Window.qml
index 982a3f1f7..aa8063460 100644
--- a/src/gui/tray/Window.qml
+++ b/src/gui/tray/Window.qml
@@ -170,6 +170,17 @@ Window {
MenuItem {
id: addAccountButton
height: Style.addAccountButtonHeight
+ hoverEnabled: true
+
+ background: Item {
+ height: parent.height
+ width: parent.menu.width
+ Rectangle {
+ anchors.fill: parent
+ anchors.margins: 1
+ color: parent.parent.hovered ? Style.lightHover : "transparent"
+ }
+ }
RowLayout {
anchors.fill: parent
@@ -207,19 +218,52 @@ Window {
MenuItem {
id: syncPauseButton
font.pixelSize: Style.topLinePixelSize
+ hoverEnabled: true
onClicked: Systray.pauseResumeSync()
+
+ background: Item {
+ height: parent.height
+ width: parent.menu.width
+ Rectangle {
+ anchors.fill: parent
+ anchors.margins: 1
+ color: parent.parent.hovered ? Style.lightHover : "transparent"
+ }
+ }
}
MenuItem {
text: qsTr("Settings")
font.pixelSize: Style.topLinePixelSize
+ hoverEnabled: true
onClicked: Systray.openSettings()
+
+ background: Item {
+ height: parent.height
+ width: parent.menu.width
+ Rectangle {
+ anchors.fill: parent
+ anchors.margins: 1
+ color: parent.parent.hovered ? Style.lightHover : "transparent"
+ }
+ }
}
MenuItem {
text: qsTr("Exit");
font.pixelSize: Style.topLinePixelSize
+ hoverEnabled: true
onClicked: Systray.shutdown()
+
+ background: Item {
+ height: parent.height
+ width: parent.menu.width
+ Rectangle {
+ anchors.fill: parent
+ anchors.margins: 1
+ color: parent.parent.hovered ? Style.lightHover : "transparent"
+ }
+ }
}
}
}