mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-05-19 14:15:02 -04:00
This PR adds/updates notification icons to latest version provided by designs. Also this PR provides new implementation for CallLogDetailsWindow. The window was using one of the icons updated. To avoid making temporary corrections on the icon's hardcoded (x,y,w,h) properties, the entire window was redesign to use up-to-date ModuitaOS GUI features.
52 lines
1.5 KiB
C++
52 lines
1.5 KiB
C++
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#pragma once
|
|
|
|
#include <ListItem.hpp>
|
|
#include <BoxLayout.hpp>
|
|
#include <Text.hpp>
|
|
#include <RichTextParser.hpp>
|
|
#include <widgets/ButtonOnOff.hpp>
|
|
|
|
#include "NotificationData.hpp"
|
|
|
|
namespace gui
|
|
{
|
|
|
|
class TextFixedSize;
|
|
|
|
class NotificationListItem : public ListItem
|
|
{
|
|
using NotificationType = notifications::NotificationType;
|
|
const NotificationType type = NotificationType::NotSeenSms;
|
|
bool dismissible = false;
|
|
|
|
protected:
|
|
gui::HBox *box = nullptr;
|
|
gui::TextFixedSize *text = nullptr;
|
|
|
|
public:
|
|
explicit NotificationListItem(NotificationType type);
|
|
|
|
[[nodiscard]] bool isDismissible() const noexcept;
|
|
[[nodiscard]] NotificationType getType() const noexcept;
|
|
void setName(const UTF8 &name, bool isRich = false, gui::text::RichTextParser::TokenMap &&tokens = {});
|
|
void setDismissible(bool isDismissible) noexcept;
|
|
};
|
|
|
|
class NotificationWithEventCounter : public NotificationListItem
|
|
{
|
|
public:
|
|
NotificationWithEventCounter(notifications::NotificationType type, const UTF8 &indicator);
|
|
};
|
|
|
|
class NotificationWithOnOffButton : public NotificationListItem
|
|
{
|
|
|
|
public:
|
|
NotificationWithOnOffButton(notifications::NotificationType type, gui::ButtonState state);
|
|
};
|
|
|
|
} // namespace gui
|