mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-04 14:20:59 +00:00
fixed os x crash with tray icon disabled, fixed retina photos overview indicators
This commit is contained in:
parent
9a3ea063c8
commit
c3a5194a6c
Telegram/SourceFiles
@ -19,8 +19,10 @@ Copyright (c) 2014 John Preston, https://tdesktop.com
|
||||
|
||||
static const int32 AppVersion = 6001;
|
||||
static const wchar_t *AppVersionStr = L"0.6.1";
|
||||
|
||||
static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)";
|
||||
static const wchar_t *AppName = L"Telegram Desktop";
|
||||
|
||||
static const wchar_t *AppId = L"{53F49750-6209-4FBF-9CA8-7A333C87D1ED}";
|
||||
static const wchar_t *AppFile = L"Telegram";
|
||||
|
||||
|
@ -635,6 +635,7 @@ void OverviewInner::paintEvent(QPaintEvent *e) {
|
||||
p.drawPixmap(pos, pix, QRect(0, (h - w) / 2, w, w));
|
||||
size = w;
|
||||
}
|
||||
size /= cIntRetinaFactor();
|
||||
|
||||
if (!quality) {
|
||||
uint64 dt = itemAnimations().animate(item, getms());
|
||||
|
@ -133,19 +133,13 @@ void PsMainWindow::psRefreshTaskbarIcon() {
|
||||
}
|
||||
|
||||
void PsMainWindow::psUpdateWorkmode() {
|
||||
switch (cWorkMode()) {
|
||||
case dbiwmWindowAndTray:
|
||||
case dbiwmTrayOnly: {
|
||||
setupTrayIcon();
|
||||
} break;
|
||||
|
||||
case dbiwmWindowOnly: {
|
||||
if (trayIcon) {
|
||||
trayIcon->setContextMenu(0);
|
||||
trayIcon->deleteLater();
|
||||
}
|
||||
trayIcon = 0;
|
||||
} break;
|
||||
setupTrayIcon();
|
||||
if (cWorkMode() == dbiwmWindowOnly) {
|
||||
if (trayIcon) {
|
||||
trayIcon->setContextMenu(0);
|
||||
trayIcon->deleteLater();
|
||||
}
|
||||
trayIcon = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -795,7 +795,9 @@ void Window::updateTrayMenu(bool force) {
|
||||
disconnect(first, SIGNAL(triggered(bool)), 0, 0);
|
||||
connect(first, SIGNAL(triggered(bool)), this, active ? SLOT(minimizeToTray()) : SLOT(showFromTray()));
|
||||
#ifndef Q_OS_WIN
|
||||
trayIcon->setContextMenu((active || cPlatform() != dbipMac) ? trayIconMenu : 0);
|
||||
if (trayIcon) {
|
||||
trayIcon->setContextMenu((active || cPlatform() != dbipMac) ? trayIconMenu : 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user