mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Refactor icon unread counter painting.
This commit is contained in:
@@ -11,6 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "base/timer.h"
|
||||
#include "base/object_ptr.h"
|
||||
#include "core/core_settings.h"
|
||||
#include "base/required.h"
|
||||
|
||||
#include <QtWidgets/QSystemTrayIcon>
|
||||
|
||||
@@ -35,11 +36,21 @@ class SessionController;
|
||||
class TitleWidget;
|
||||
struct TermsLock;
|
||||
|
||||
QImage LoadLogo();
|
||||
QImage LoadLogoNoMargin();
|
||||
QIcon CreateIcon(Main::Session *session = nullptr);
|
||||
[[nodiscard]] const QImage &Logo();
|
||||
[[nodiscard]] const QImage &LogoNoMargin();
|
||||
[[nodiscard]] QIcon CreateIcon(Main::Session *session = nullptr);
|
||||
void ConvertIconToBlack(QImage &image);
|
||||
|
||||
struct CounterLayerArgs {
|
||||
base::required<int> size = 16;
|
||||
base::required<int> count = 1;
|
||||
base::required<style::color> bg;
|
||||
base::required<style::color> fg;
|
||||
};
|
||||
|
||||
[[nodiscard]] QImage GenerateCounterLayer(CounterLayerArgs &&args);
|
||||
[[nodiscard]] QImage WithSmallCounter(QImage image, CounterLayerArgs &&args);
|
||||
|
||||
class MainWindow : public Ui::RpWindow {
|
||||
public:
|
||||
explicit MainWindow(not_null<Controller*> controller);
|
||||
|
Reference in New Issue
Block a user