small component patches + code cleanup
This commit is contained in:
@@ -16,17 +16,17 @@ ModuleChip {
|
||||
property bool historyOpen: historyPopup.popupOpen
|
||||
|
||||
width: 35
|
||||
height: 40
|
||||
height: Cfg.Config.moduleHeight
|
||||
radius: panelRadius
|
||||
|
||||
color: hoverHandler.hovered ? t.notifBgHover : t.notifBg
|
||||
chipColor: t.notifBg
|
||||
chipColorHovered: t.notifBgHover
|
||||
popupOpen: historyOpen
|
||||
|
||||
border.color: root.doNotDisturb
|
||||
? t.notifDnd
|
||||
: ((hoverHandler.hovered || historyOpen) ? t.notifBorderActive : t.notifBorder)
|
||||
border.width: borderWidth
|
||||
: ((hovered || historyOpen) ? t.notifBorderActive : t.notifBorder)
|
||||
|
||||
Behavior on color { ColorAnimation { duration: 150 } }
|
||||
Behavior on border.color { ColorAnimation { duration: 150 } }
|
||||
Behavior on width { NumberAnimation { duration: 200; easing.type: Easing.OutCubic } }
|
||||
|
||||
component NotificationCard: Item {
|
||||
@@ -41,8 +41,8 @@ ModuleChip {
|
||||
property int timeout: 5000
|
||||
|
||||
property var t
|
||||
property var urgencyColor: function(u) { return "#ffffff" }
|
||||
property var urgencyIcon: function(u) { return "" }
|
||||
property var urgencyColor
|
||||
property var urgencyIcon
|
||||
|
||||
signal dismissed(string toastId)
|
||||
|
||||
@@ -250,8 +250,8 @@ ModuleChip {
|
||||
property string timeStr: ""
|
||||
|
||||
property var t
|
||||
property var urgencyColor: function(u) { return "#ffffff" }
|
||||
property var urgencyIcon: function(u) { return "" }
|
||||
property var urgencyColor
|
||||
property var urgencyIcon
|
||||
|
||||
signal dismissed(int itemIndex)
|
||||
|
||||
@@ -334,7 +334,7 @@ ModuleChip {
|
||||
}
|
||||
}
|
||||
|
||||
HoverHandler { id: hoverHandler; cursorShape: Qt.PointingHandCursor; onHoveredChanged: if (hovered && Cfg.Config.notificationShakeEnabled) bellRingAnim.start() }
|
||||
HoverHandler { cursorShape: Qt.PointingHandCursor; onHoveredChanged: if (hovered && Cfg.Config.notificationShakeEnabled) bellRingAnim.start() }
|
||||
TapHandler {
|
||||
onTapped: {
|
||||
if (historyPopup.popupOpen) {
|
||||
@@ -458,7 +458,7 @@ ModuleChip {
|
||||
var finalTimeout = (notif.expireTimeout > 0) ? notif.expireTimeout : cfgTimeout
|
||||
|
||||
if (!root.doNotDisturb) {
|
||||
var toastEntry = { toastId, nid: notif.id, appName, summary, body, urgency, timeStr, timeout: finalTimeout }
|
||||
var toastEntry = { toastId, appName, summary, body, urgency, timeStr, timeout: finalTimeout }
|
||||
if (toastLayer.atBottom) activeToasts.append(toastEntry)
|
||||
else activeToasts.insert(0, toastEntry)
|
||||
if (!root.historyOpen) root.unreadCount++
|
||||
|
||||
Reference in New Issue
Block a user