Update controls geometry in MainWindow according to body changes

This commit is contained in:
Ilya Fedin 2021-11-10 12:53:29 +04:00 committed by John Preston
parent fd03217032
commit 936d4004ff
2 changed files with 5 additions and 5 deletions

View File

@ -318,6 +318,11 @@ MainWindow::MainWindow(not_null<Controller*> controller)
Ui::Toast::SetDefaultParent(_body.data());
body()->sizeValue(
) | rpl::start_with_next([=](QSize size) {
updateControlsGeometry();
}, lifetime());
if (_outdated) {
_outdated->heightValue(
) | rpl::filter([=] {
@ -749,10 +754,6 @@ void MainWindow::attachToTrayIcon(not_null<QSystemTrayIcon*> icon) {
});
}
void MainWindow::resizeEvent(QResizeEvent *e) {
updateControlsGeometry();
}
rpl::producer<> MainWindow::leaveEvents() const {
return _leaveEvents.events();
}

View File

@ -131,7 +131,6 @@ public:
}
protected:
void resizeEvent(QResizeEvent *e) override;
void leaveEventHook(QEvent *e) override;
void savePosition(Qt::WindowState state = Qt::WindowActive);