summaryrefslogtreecommitdiff
path: root/contents/ui/ActivityView.qml
diff options
context:
space:
mode:
authorFrederick Yin <fkfd@fkfd.me>2023-07-26 14:17:47 +0800
committerFrederick Yin <fkfd@fkfd.me>2023-07-26 14:17:47 +0800
commitf57e9259c0cddfa22304ccac633fd8e5a051a816 (patch)
treee4a50fdb33533aae93e95cb3394f4a58dcb072a1 /contents/ui/ActivityView.qml
parentf0d26fb12a6e0f3ac115244f0e5736b8c944d39b (diff)
Show buttons only when mouse is hovering
Diffstat (limited to 'contents/ui/ActivityView.qml')
-rw-r--r--contents/ui/ActivityView.qml5
1 files changed, 5 insertions, 0 deletions
diff --git a/contents/ui/ActivityView.qml b/contents/ui/ActivityView.qml
index e8d840a..e48b2a5 100644
--- a/contents/ui/ActivityView.qml
+++ b/contents/ui/ActivityView.qml
@@ -11,7 +11,9 @@ import org.kde.plasma.extras 2.0 as PlasmaExtras
import "activity.js" as Activity
PlasmaComponents.ListItem {
+ id: activityItem
separatorVisible: false
+ enabled: true // enable mouse event handling
RowLayout {
id: activityView
width: (type == "announcement" ? announcementsListView : assignmentsListView).width
@@ -83,6 +85,8 @@ PlasmaComponents.ListItem {
PlasmaComponents3.ToolButton {
icon.name: "view-visible"
+ // only show when mouse is hovering above this activity
+ opacity: activityItem.containsMouse ? 1 : 0
onClicked: () => {
Qt.openUrlExternally(url)
}
@@ -91,6 +95,7 @@ PlasmaComponents.ListItem {
PlasmaComponents3.ToolButton {
icon.name: "emblem-important-symbolic"
checked: important
+ opacity: activityItem.containsMouse ? 1 : 0
onClicked: () => {
important = !important