From 95f756a3950b79c13fa2674dd70927d9a2285003 Mon Sep 17 00:00:00 2001
From: EndrII <EndrIIMail@gmail.com>
Date: Sun, 7 Nov 2021 12:23:53 +0300
Subject: [PATCH] added cone button on notifications

---
 NotifyModule/NotificationForm.qml | 92 ++++++++++++++++++++++---------
 1 file changed, 65 insertions(+), 27 deletions(-)

diff --git a/NotifyModule/NotificationForm.qml b/NotifyModule/NotificationForm.qml
index bd7ea6d..5b8548d 100644
--- a/NotifyModule/NotificationForm.qml
+++ b/NotifyModule/NotificationForm.qml
@@ -35,21 +35,70 @@ BasePopUp {
     }
 
     autoClose: true;
-    closeInterval: 5000
+    closeInterval: 10000
 
     margins: 0
     margin: 0
     spacing: 0
 
-
     backgroundColor: Material.background
 
+    header: Pane {
+
+        RowLayout {
+            width: popup.width
+
+            Label {
+                text: title
+                wrapMode: Text.WordWrap
+                font.bold: true
+                font.pointSize: 13
+                Layout.fillWidth: true
+            }
+
+            ToolButton {
+                text: "X"
+
+                onClicked:  {
+                    close();
+                }
+            }
+        }
+    }
+
     contentItem:
         Control {
         id: control;
         implicitHeight: rowLayout.implicitHeight
         implicitWidth: 0x0
 
+        MouseArea {
+            hoverEnabled: true
+            onEntered: {
+                autoclosePause();
+            }
+
+            onExited: {
+                autocloseResume();
+
+            }
+
+            onClicked: {
+
+                if (!autoClose) {
+                    close();
+                }
+
+                if (autoClosePasused) {
+                    autocloseResume()
+                } else {
+                    autoclosePause();
+                }
+            }
+
+            anchors.fill: parent
+        }
+
         RowLayout {
             id: rowLayout
             spacing: 5
@@ -78,34 +127,23 @@ BasePopUp {
                 wrapMode: Text.WordWrap
                 verticalAlignment: Text.AlignVCenter
                 horizontalAlignment: Text.AlignLeft
+                linkColor: Material.accent
+
+                onLinkActivated: (link) => {
+                                     Qt.openUrlExternally(link)
+                                 }
+                onLinkHovered: (link) => {
+                                   if (link.length) {
+                                        message.ToolTip.show(link)
+                                   } else {
+                                       message.ToolTip.hide()
+                                   }
+                               }
+
+
             }
 
-        }
 
-        MouseArea {
-            hoverEnabled: true
-            onEntered: {
-                autoclosePause();
-            }
-
-            onExited: {
-                autocloseResume();
-            }
-
-            onClicked: {
-
-                if (!autoClose) {
-                    close();
-                }
-
-                if (autoClosePasused) {
-                    autocloseResume()
-                } else {
-                    autoclosePause();
-                }
-            }
-
-            anchors.fill: parent
         }
     }