From ae08aa21a98bb3b08b5d65f0f479561505885851 Mon Sep 17 00:00:00 2001 From: reionwong Date: Sun, 10 Oct 2021 05:04:37 +0800 Subject: [PATCH] Notification: update clear icon --- cutefish | 2 +- notificationd/historymodel.cpp | 19 +++++++++++++++++ notificationd/historymodel.h | 19 +++++++++++++++++ notificationd/images/dark/clear.svg | 2 +- notificationd/images/light/clear.svg | 27 ++++++++++++++---------- notificationd/qml/NotificationWindow.qml | 12 ++++++++--- 6 files changed, 65 insertions(+), 16 deletions(-) diff --git a/cutefish b/cutefish index 71c54dc..086fe41 100644 --- a/cutefish +++ b/cutefish @@ -1,2 +1,2 @@ [General] -Version=0.5 \ No newline at end of file +Version=0.5.1 \ No newline at end of file diff --git a/notificationd/historymodel.cpp b/notificationd/historymodel.cpp index d9b6bc3..5970b06 100644 --- a/notificationd/historymodel.cpp +++ b/notificationd/historymodel.cpp @@ -1,3 +1,22 @@ +/* + * Copyright (C) 2021 CutefishOS Team. + * + * Author: Reion Wong + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include "historymodel.h" #include diff --git a/notificationd/historymodel.h b/notificationd/historymodel.h index 8dba4c9..e58a5e7 100644 --- a/notificationd/historymodel.h +++ b/notificationd/historymodel.h @@ -1,3 +1,22 @@ +/* + * Copyright (C) 2021 CutefishOS Team. + * + * Author: Reion Wong + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #ifndef HISTORYMODEL_H #define HISTORYMODEL_H diff --git a/notificationd/images/dark/clear.svg b/notificationd/images/dark/clear.svg index 4d66103..97248c3 100644 --- a/notificationd/images/dark/clear.svg +++ b/notificationd/images/dark/clear.svg @@ -14,5 +14,5 @@ color:#363636; } - + diff --git a/notificationd/images/light/clear.svg b/notificationd/images/light/clear.svg index 91fa997..9720bee 100644 --- a/notificationd/images/light/clear.svg +++ b/notificationd/images/light/clear.svg @@ -1,13 +1,18 @@ - - - + + diff --git a/notificationd/qml/NotificationWindow.qml b/notificationd/qml/NotificationWindow.qml index c4b80b5..b405369 100644 --- a/notificationd/qml/NotificationWindow.qml +++ b/notificationd/qml/NotificationWindow.qml @@ -147,6 +147,12 @@ Item { : 0.03 } + MouseArea { + id: _itemMouseArea + anchors.fill: parent + hoverEnabled: true + } + RowLayout { anchors.fill: parent anchors.margins: FishUI.Units.smallSpacing @@ -205,7 +211,7 @@ Item { height: 24 source: "qrc:/images/" + (FishUI.Theme.darkMode ? "dark" : "light") + "/close.svg" sourceSize: Qt.size(width, height) - visible: true + visible: _itemMouseArea.containsMouse z: 9999 Rectangle { @@ -216,14 +222,14 @@ Item { z: -1 anchors.fill: parent - color: _closeBtnArea.pressed ? pressedColor : _closeBtnArea.containsMouse ? hoveredColor : "transparent" + color: "transparent" radius: height / 2 } MouseArea { id: _closeBtnArea anchors.fill: parent - hoverEnabled: true + // hoverEnabled: true onClicked: { historyModel.remove(index) }