mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Attempt to fix initial window position on Windows.
This commit is contained in:
parent
3eefaac885
commit
fc2f41096f
6 changed files with 11 additions and 5 deletions
|
@ -360,7 +360,7 @@ void Application::run() {
|
||||||
startDomain();
|
startDomain();
|
||||||
startTray();
|
startTray();
|
||||||
|
|
||||||
_lastActivePrimaryWindow->widget()->show();
|
_lastActivePrimaryWindow->firstShow();
|
||||||
|
|
||||||
startMediaView();
|
startMediaView();
|
||||||
|
|
||||||
|
|
|
@ -475,7 +475,6 @@ void MainWindow::init() {
|
||||||
}
|
}
|
||||||
refreshTitleWidget();
|
refreshTitleWidget();
|
||||||
|
|
||||||
initGeometry();
|
|
||||||
updateTitle();
|
updateTitle();
|
||||||
updateWindowIcon();
|
updateWindowIcon();
|
||||||
}
|
}
|
||||||
|
@ -772,9 +771,10 @@ QRect MainWindow::countInitialGeometry(
|
||||||
return position.rect();
|
return position.rect();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::initGeometry() {
|
void MainWindow::firstShow() {
|
||||||
updateMinimumSize();
|
updateMinimumSize();
|
||||||
if (initGeometryFromSystem()) {
|
if (initGeometryFromSystem()) {
|
||||||
|
show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const auto geometry = countInitialGeometry(initialPosition());
|
const auto geometry = countInitialGeometry(initialPosition());
|
||||||
|
@ -784,6 +784,7 @@ void MainWindow::initGeometry() {
|
||||||
).arg(geometry.width()
|
).arg(geometry.width()
|
||||||
).arg(geometry.height()));
|
).arg(geometry.height()));
|
||||||
setGeometry(geometry);
|
setGeometry(geometry);
|
||||||
|
show();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::positionUpdated() {
|
void MainWindow::positionUpdated() {
|
||||||
|
|
|
@ -132,6 +132,7 @@ public:
|
||||||
void recountGeometryConstraints();
|
void recountGeometryConstraints();
|
||||||
virtual void updateControlsGeometry();
|
virtual void updateControlsGeometry();
|
||||||
|
|
||||||
|
void firstShow();
|
||||||
bool minimizeToTray();
|
bool minimizeToTray();
|
||||||
void updateGlobalMenu() {
|
void updateGlobalMenu() {
|
||||||
updateGlobalMenuHook();
|
updateGlobalMenuHook();
|
||||||
|
@ -197,7 +198,6 @@ private:
|
||||||
[[nodiscard]] Core::WindowPosition nextInitialChildPosition(
|
[[nodiscard]] Core::WindowPosition nextInitialChildPosition(
|
||||||
bool primary);
|
bool primary);
|
||||||
[[nodiscard]] QRect countInitialGeometry(Core::WindowPosition position);
|
[[nodiscard]] QRect countInitialGeometry(Core::WindowPosition position);
|
||||||
void initGeometry();
|
|
||||||
|
|
||||||
bool computeIsActive() const;
|
bool computeIsActive() const;
|
||||||
|
|
||||||
|
|
|
@ -311,6 +311,10 @@ void Controller::showTermsDelete() {
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Controller::firstShow() {
|
||||||
|
_widget.firstShow();
|
||||||
|
}
|
||||||
|
|
||||||
void Controller::finishFirstShow() {
|
void Controller::finishFirstShow() {
|
||||||
_widget.finishFirstShow();
|
_widget.finishFirstShow();
|
||||||
checkThemeEditor();
|
checkThemeEditor();
|
||||||
|
|
|
@ -74,6 +74,7 @@ public:
|
||||||
|
|
||||||
[[nodiscard]] Adaptive &adaptive() const;
|
[[nodiscard]] Adaptive &adaptive() const;
|
||||||
|
|
||||||
|
void firstShow();
|
||||||
void finishFirstShow();
|
void finishFirstShow();
|
||||||
|
|
||||||
void setupPasscodeLock();
|
void setupPasscodeLock();
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 00f5bdaccdff4f53e8ba347f09f2de161b7ca7da
|
Subproject commit aa39793a91f1186879c15c214a2671d78eab5085
|
Loading…
Add table
Reference in a new issue