Update controls geometry in MainWindow according to body changes
This commit is contained in:
parent
fd03217032
commit
936d4004ff
|
@ -318,6 +318,11 @@ MainWindow::MainWindow(not_null<Controller*> controller)
|
||||||
|
|
||||||
Ui::Toast::SetDefaultParent(_body.data());
|
Ui::Toast::SetDefaultParent(_body.data());
|
||||||
|
|
||||||
|
body()->sizeValue(
|
||||||
|
) | rpl::start_with_next([=](QSize size) {
|
||||||
|
updateControlsGeometry();
|
||||||
|
}, lifetime());
|
||||||
|
|
||||||
if (_outdated) {
|
if (_outdated) {
|
||||||
_outdated->heightValue(
|
_outdated->heightValue(
|
||||||
) | rpl::filter([=] {
|
) | rpl::filter([=] {
|
||||||
|
@ -749,10 +754,6 @@ void MainWindow::attachToTrayIcon(not_null<QSystemTrayIcon*> icon) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::resizeEvent(QResizeEvent *e) {
|
|
||||||
updateControlsGeometry();
|
|
||||||
}
|
|
||||||
|
|
||||||
rpl::producer<> MainWindow::leaveEvents() const {
|
rpl::producer<> MainWindow::leaveEvents() const {
|
||||||
return _leaveEvents.events();
|
return _leaveEvents.events();
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,7 +131,6 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void resizeEvent(QResizeEvent *e) override;
|
|
||||||
void leaveEventHook(QEvent *e) override;
|
void leaveEventHook(QEvent *e) override;
|
||||||
|
|
||||||
void savePosition(Qt::WindowState state = Qt::WindowActive);
|
void savePosition(Qt::WindowState state = Qt::WindowActive);
|
||||||
|
|
Loading…
Reference in New Issue