2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 15:05:56 +00:00

Move many widget classes to lib_ui.

This commit is contained in:
John Preston
2019-09-16 14:14:06 +03:00
parent dda587a2fc
commit 849deb57e2
189 changed files with 3750 additions and 2572 deletions

View File

@@ -23,7 +23,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <QtCore/QStandardPaths>
#include <QtCore/QProcess>
#include <QtCore/QVersionNumber>
#include <qpa/qplatformnativeinterface.h>
#include <sys/stat.h>
#include <sys/types.h>
@@ -92,10 +91,6 @@ void FallbackFontConfig() {
namespace Platform {
bool IsApplicationActive() {
return QApplication::activeWindow() != nullptr;
}
void SetApplicationIcon(const QIcon &icon) {
QApplication::setWindowIcon(icon);
}
@@ -135,12 +130,6 @@ QRect psDesktopRect() {
return _monitorRect;
}
void psShowOverAll(QWidget *w, bool canFocus) {
}
void psBringToBack(QWidget *w) {
}
void psWriteDump() {
}
@@ -243,29 +232,6 @@ void finish() {
Notifications::Finish();
}
bool TranslucentWindowsSupported(QPoint globalPosition) {
if (const auto native = QGuiApplication::platformNativeInterface()) {
if (const auto desktop = QApplication::desktop()) {
const auto index = desktop->screenNumber(globalPosition);
const auto screens = QGuiApplication::screens();
if (const auto screen = (index >= 0 && index < screens.size()) ? screens[index] : QGuiApplication::primaryScreen()) {
if (native->nativeResourceForScreen(QByteArray("compositingEnabled"), screen)) {
return true;
}
static auto WarnedAbout = base::flat_set<int>();
if (!WarnedAbout.contains(index)) {
WarnedAbout.insert(index);
LOG(("WARNING: Compositing is disabled for screen index %1 (for position %2,%3)").arg(index).arg(globalPosition.x()).arg(globalPosition.y()));
}
} else {
LOG(("WARNING: Could not get screen for index %1 (for position %2,%3)").arg(index).arg(globalPosition.x()).arg(globalPosition.y()));
}
}
}
return false;
}
void RegisterCustomScheme() {
#ifndef TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME
auto home = getHomeDir();
@@ -432,9 +398,6 @@ void psAutoStart(bool start, bool silent) {
void psSendToMenu(bool send, bool silent) {
}
void psUpdateOverlayed(QWidget *widget) {
}
bool linuxMoveFile(const char *from, const char *to) {
FILE *ffrom = fopen(from, "rb"), *fto = fopen(to, "wb");
if (!ffrom) {