Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion panels/notification/bubble/bubblepanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
#include "pluginfactory.h"

#include <QLoggingCategory>
#include <QQueue>

Check warning on line 12 in panels/notification/bubble/bubblepanel.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QQueue> not found. Please note: Cppcheck does not need standard library headers to get proper results.

Check warning on line 12 in panels/notification/bubble/bubblepanel.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QQueue> not found. Please note: Cppcheck does not need standard library headers to get proper results.

Check warning on line 12 in panels/notification/bubble/bubblepanel.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QQueue> not found. Please note: Cppcheck does not need standard library headers to get proper results.

#include <appletbridge.h>

Check warning on line 14 in panels/notification/bubble/bubblepanel.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <appletbridge.h> not found. Please note: Cppcheck does not need standard library headers to get proper results.

Check warning on line 14 in panels/notification/bubble/bubblepanel.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <appletbridge.h> not found. Please note: Cppcheck does not need standard library headers to get proper results.

Check warning on line 14 in panels/notification/bubble/bubblepanel.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <appletbridge.h> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <qtimer.h>

Check warning on line 15 in panels/notification/bubble/bubblepanel.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <qtimer.h> not found. Please note: Cppcheck does not need standard library headers to get proper results.

Check warning on line 15 in panels/notification/bubble/bubblepanel.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <qtimer.h> not found. Please note: Cppcheck does not need standard library headers to get proper results.

Check warning on line 15 in panels/notification/bubble/bubblepanel.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <qtimer.h> not found. Please note: Cppcheck does not need standard library headers to get proper results.

namespace notification {
Q_DECLARE_LOGGING_CATEGORY(notifyLog)
Expand Down Expand Up @@ -110,7 +111,14 @@
void BubblePanel::onBubbleCountChanged()
{
bool isEmpty = m_bubbles->items().isEmpty();
setVisible(!isEmpty && enabled());
const bool visible = !isEmpty && enabled();
if (!visible) {
QTimer::singleShot(400, this, [this]() {
setVisible(false);
});
} else {
setVisible(visible);
}
}

void BubblePanel::addBubble(qint64 id)
Expand Down
26 changes: 25 additions & 1 deletion panels/notification/bubble/package/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Window {
ListView {
id: bubbleView
width: 360
height: contentHeight
height: Math.max(contentHeight, childrenRect.height)
anchors {
right: parent.right
bottom: parent.bottom
Expand Down Expand Up @@ -128,6 +128,30 @@ Window {
easing.type: Easing.OutExpo
}
}

remove: Transition {
SequentialAnimation {
PropertyAction {
property: "ListView.delayRemove"
value: true
}

ParallelAnimation {
NumberAnimation {
property: "x"
to: 360
duration: 400
easing.type: Easing.InExpo
}
}

PropertyAction {
property: "ListView.delayRemove"
value: false
}
}
}

delegate: Bubble {
width: 360
bubble: model
Expand Down
Loading