2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-01 23:25:15 +00:00

Remove some App::wnd() calls.

This commit is contained in:
John Preston
2021-02-25 19:12:51 +04:00
parent 204dd0a869
commit 54f06740d5
27 changed files with 137 additions and 106 deletions

View File

@@ -545,7 +545,7 @@ std::optional<bool> IsDarkMode() {
if (integration->checkVersion(3, 0, 0)) {
const auto preferDarkTheme = integration->getBoolSetting(
qsl("gtk-application-prefer-dark-theme"));
if (!preferDarkTheme.has_value()) {
return std::nullopt;
} else if (*preferDarkTheme) {
@@ -588,17 +588,6 @@ bool SkipTaskbarSupported() {
} // namespace Platform
QRect psDesktopRect() {
static QRect _monitorRect;
static auto _monitorLastGot = 0LL;
auto tnow = crl::now();
if (tnow > _monitorLastGot + 1000LL || tnow < _monitorLastGot) {
_monitorLastGot = tnow;
_monitorRect = QApplication::desktop()->availableGeometry(App::wnd());
}
return _monitorRect;
}
void psWriteDump() {
}