2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Removed blue window title, new small title used only in Windows.

This commit is contained in:
John Preston
2016-11-04 11:23:50 +03:00
parent 1ecd6866c7
commit 0cbb0014db
72 changed files with 726 additions and 1583 deletions

View File

@@ -21,6 +21,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
#include "stdafx.h"
#include "platform/linux/main_window_linux.h"
#include "styles/style_window.h"
#include "platform/linux/linux_libs.h"
#include "platform/platform_notifications_manager.h"
#include "mainwindow.h"
@@ -205,9 +206,6 @@ void MainWindow::psStatusIconCheck() {
void MainWindow::psShowTrayMenu() {
}
void MainWindow::psRefreshTaskbarIcon() {
}
void MainWindow::psTrayMenuUpdated() {
if (noQtTrayIcon && (useAppIndicator || useStatusIcon)) {
const QList<QAction*> &actions = trayIconMenu->actions();
@@ -434,13 +432,10 @@ void MainWindow::LibsLoaded() {
}
void MainWindow::psInitSize() {
setMinimumWidth(st::wndMinWidth);
setMinimumHeight(st::wndMinHeight);
TWindowPos pos(cWindowPos());
QRect avail(QDesktopWidget().availableGeometry());
bool maximized = false;
QRect geom(avail.x() + (avail.width() - st::wndDefWidth) / 2, avail.y() + (avail.height() - st::wndDefHeight) / 2, st::wndDefWidth, st::wndDefHeight);
QRect geom(avail.x() + (avail.width() - st::windowDefWidth) / 2, avail.y() + (avail.height() - st::windowDefHeight) / 2, st::windowDefWidth, st::windowDefHeight);
if (pos.w && pos.h) {
QList<QScreen*> screens = Application::screens();
for (QList<QScreen*>::const_iterator i = screens.cbegin(), e = screens.cend(); i != e; ++i) {
@@ -448,7 +443,7 @@ void MainWindow::psInitSize() {
if (pos.moncrc == hashCrc32(name.constData(), name.size())) {
QRect screen((*i)->geometry());
int32 w = screen.width(), h = screen.height();
if (w >= st::wndMinWidth && h >= st::wndMinHeight) {
if (w >= st::windowMinWidth && h >= st::windowMinHeight) {
if (pos.w > w) pos.w = w;
if (pos.h > h) pos.h = h;
pos.x += screen.x();
@@ -649,10 +644,6 @@ void MainWindow::psFirstShow() {
posInited = true;
}
bool MainWindow::psHandleTitle() {
return false;
}
void MainWindow::psInitSysMenu() {
}

View File

@@ -43,14 +43,13 @@ public:
void psUpdateMargins();
void psUpdatedPosition();
bool psHandleTitle();
void psFlash();
void psNotifySettingGot();
void psUpdateWorkmode();
void psRefreshTaskbarIcon();
void psRefreshTaskbarIcon() {
}
bool psPosInited() const {
return posInited;

View File

@@ -27,19 +27,6 @@ namespace Notifications {
inline void defaultNotificationShown(QWidget *widget) {
}
inline bool skipAudio() {
return false;
}
inline bool skipToast() {
return false;
}
class Manager;
void start();
Manager *manager();
bool supported();
void finish();
class Manager : public Window::Notifications::NativeManager {
public: