From d6e5294daece7e56b271f53a5d496f5edd620916 Mon Sep 17 00:00:00 2001 From: Frederick Yin Date: Wed, 26 Jul 2023 18:47:56 +0800 Subject: Clicking title opens activity instead of toggling finished --- contents/ui/ActivityView.qml | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/contents/ui/ActivityView.qml b/contents/ui/ActivityView.qml index ff27a14..febc4e0 100644 --- a/contents/ui/ActivityView.qml +++ b/contents/ui/ActivityView.qml @@ -78,9 +78,16 @@ PlasmaComponents.ListItem { MouseArea { width: parent.width height: parent.height + cursorShape: + type == "announcement" + ? Qt.ArrowCursor + : Qt.PointingHandCursor onClicked: () => { - activityCheckbox.toggle() // toggle checkbox - activityCheckbox.toggled() // and trigger the onToggled effects + if (type == "announcement") { + expanded = !expanded + } else { + Qt.openUrlExternally(url) + } } } } @@ -89,25 +96,6 @@ PlasmaComponents.ListItem { // buttons RowLayout { Layout.alignment: Qt.AlignRight - - PlasmaComponents3.ToolButton { - icon.name: "expand" - visible: type == "announcement" - // only show when mouse is hovering above this activity - opacity: activityItem.containsMouse ? 1 : 0 - onClicked: () => { - expanded = !expanded - } - } - - PlasmaComponents3.ToolButton { - icon.name: "view-visible" - opacity: activityItem.containsMouse ? 1 : 0 - onClicked: () => { - Qt.openUrlExternally(url) - } - } - PlasmaComponents3.ToolButton { icon.name: "emblem-important-symbolic" checked: important -- cgit v1.2.3