mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Show reset scale button if window doesn't fit.
This commit is contained in:
@@ -340,7 +340,15 @@ void MainWindow::initSize() {
|
||||
|
||||
auto avail = QDesktopWidget().availableGeometry();
|
||||
bool maximized = false;
|
||||
auto geom = QRect(avail.x() + (avail.width() - st::windowDefaultWidth) / 2, avail.y() + (avail.height() - st::windowDefaultHeight) / 2, st::windowDefaultWidth, st::windowDefaultHeight);
|
||||
auto geom = QRect(
|
||||
avail.x() + std::max(
|
||||
(avail.width() - st::windowDefaultWidth) / 2,
|
||||
0),
|
||||
avail.y() + std::max(
|
||||
(avail.height() - st::windowDefaultHeight) / 2,
|
||||
0),
|
||||
st::windowDefaultWidth,
|
||||
st::windowDefaultHeight);
|
||||
if (position.w && position.h) {
|
||||
for (auto screen : QGuiApplication::screens()) {
|
||||
if (position.moncrc == screenNameChecksum(screen->name())) {
|
||||
|
Reference in New Issue
Block a user