2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Fix build and tray icon menu on Windows.

This commit is contained in:
John Preston
2021-01-22 16:16:18 +04:00
parent 2616659116
commit 574d915c23
16 changed files with 169 additions and 92 deletions

View File

@@ -40,8 +40,6 @@ class LayerStackWidget;
class MediaPreviewWidget;
class MainWindow : public Platform::MainWindow {
Q_OBJECT
public:
explicit MainWindow(not_null<Window::Controller*> controller);
~MainWindow();
@@ -55,11 +53,17 @@ public:
void setupIntro(Intro::EnterPoint point);
void setupMain();
void showSettings();
void showAddContact();
void showNewGroup();
void showNewChannel();
void setInnerFocus();
MainWidget *sessionContent() const;
[[nodiscard]] bool doWeMarkAsRead();
void activate();
bool takeThirdSectionFromLayer();
@@ -115,18 +119,6 @@ protected:
void updateIsActiveHook() override;
void clearWidgetsHook() override;
public slots:
void showSettings();
void setInnerFocus();
void quitFromTray();
void showFromTray(QSystemTrayIcon::ActivationReason reason = QSystemTrayIcon::Unknown);
void toggleDisplayNotifyFromTray();
void onShowAddContact();
void onShowNewGroup();
void onShowNewChannel();
private:
[[nodiscard]] bool skipTrayClick() const;
@@ -140,12 +132,15 @@ private:
void themeUpdated(const Window::Theme::BackgroundUpdate &data);
void toggleDisplayNotifyFromTray();
QPixmap grabInner();
QImage icon16, icon32, icon64, iconbig16, iconbig32, iconbig64;
crl::time _lastTrayClickTime = 0;
QPoint _lastMousePosition;
bool _activeForTrayIconAction = true;
object_ptr<Window::PasscodeLockWidget> _passcodeLock = { nullptr };
object_ptr<Intro::Widget> _intro = { nullptr };