mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-28 11:30:54 +00:00
Fix resetting of available geometry fix in some cases
This commit is contained in:
parent
d79fab8b3c
commit
7de8d6f9ac
@ -527,10 +527,10 @@ void MainWindow::initSize() {
|
||||
if (rightPoint > w) {
|
||||
const auto distance = rightPoint - w;
|
||||
const auto newXPos = position.x - distance;
|
||||
if (newXPos >= 0) {
|
||||
if (newXPos >= x) {
|
||||
position.x = newXPos;
|
||||
} else {
|
||||
position.x = 0;
|
||||
position.x = x;
|
||||
const auto newRightPoint = position.x + position.w;
|
||||
const auto newDistance = newRightPoint - w;
|
||||
position.w -= newDistance;
|
||||
@ -540,10 +540,10 @@ void MainWindow::initSize() {
|
||||
if (bottomPoint > h) {
|
||||
const auto distance = bottomPoint - h;
|
||||
const auto newYPos = position.y - distance;
|
||||
if (newYPos >= 0) {
|
||||
if (newYPos >= y) {
|
||||
position.y = newYPos;
|
||||
} else {
|
||||
position.y = 0;
|
||||
position.y = y;
|
||||
const auto newBottomPoint = position.y + position.h;
|
||||
const auto newDistance = newBottomPoint - h;
|
||||
position.h -= newDistance;
|
||||
|
Loading…
Reference in New Issue
Block a user