2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Refactor icon unread counter painting.

This commit is contained in:
John Preston
2021-11-02 17:10:40 +04:00
parent 87af865604
commit aef45b3a1d
15 changed files with 300 additions and 258 deletions

View File

@@ -71,9 +71,6 @@ public:
void sendPaths();
QImage iconWithCounter(int size, int count, style::color bg, style::color fg, bool smallIcon) override;
void placeSmallCounter(QImage &img, int size, int count, style::color bg, const QPoint &shift, style::color color) override;
bool contentOverlapped(const QRect &globalRect);
bool contentOverlapped(QWidget *w, QPaintEvent *e) {
return contentOverlapped(QRect(w->mapToGlobal(e->rect().topLeft()), e->rect().size()));
@@ -148,8 +145,6 @@ private:
std::unique_ptr<Media::SystemMediaControlsManager> _mediaControlsManager;
QImage icon16, icon32, icon64, iconbig16, iconbig32, iconbig64;
crl::time _lastTrayClickTime = 0;
QPoint _lastMousePosition;
bool _activeForTrayIconAction = true;