Skip to content
Merged
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
11 changes: 9 additions & 2 deletions panels/notification/bubble/bubblepanel.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

#include "bubblepanel.h"
#include "bubbleitem.h"
#include "bubblemodel.h"
#include "dataaccessorproxy.h"

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

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: "dataaccessorproxy.h" not found.
#include "pluginfactory.h"

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

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: "pluginfactory.h" not found.

#include <QTimer>

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

View workflow job for this annotation

GitHub Actions / cppcheck

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

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

View workflow job for this annotation

GitHub Actions / cppcheck

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

Check warning on line 13 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>

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

void BubblePanel::addBubble(qint64 id)
Expand Down
21 changes: 21 additions & 0 deletions panels/notification/bubble/package/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,29 @@ Window {
}
}
delegate: Bubble {
id: delegateItem
width: 360
bubble: model

ListView.onRemove: SequentialAnimation {
PropertyAction {
target: delegateItem
property: "ListView.delayRemove"
value: true
}
NumberAnimation {
target: delegateItem
property: "x"
to: 360
duration: 400
easing.type: Easing.InExpo
}
PropertyAction {
target: delegateItem
property: "ListView.delayRemove"
value: false
}
}
}
}
}
Loading