mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 08:28:11 +00:00
LibGUI+Notification: Add notification closing
Closing a notification will now allow it to be shown again, as m_showing being false means it can be re-shown.
This commit is contained in:
parent
ef4144c183
commit
0fd1e6f062
5 changed files with 24 additions and 1 deletions
|
@ -30,7 +30,8 @@
|
|||
#include <LibGfx/Bitmap.h>
|
||||
|
||||
namespace GUI {
|
||||
class NotificationServerConnection;
|
||||
|
||||
class NotificationServerConnection;
|
||||
|
||||
class Notification : public Core::Object {
|
||||
C_OBJECT(Notification);
|
||||
|
@ -48,6 +49,7 @@ public:
|
|||
void set_icon(const Gfx::Bitmap* icon) { m_icon = icon; }
|
||||
|
||||
void show();
|
||||
void close();
|
||||
|
||||
private:
|
||||
Notification();
|
||||
|
@ -57,6 +59,7 @@ private:
|
|||
RefPtr<Gfx::Bitmap> m_icon;
|
||||
|
||||
NonnullRefPtr<NotificationServerConnection> m_connection;
|
||||
bool m_showing { false };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue