mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Update controls geometry in MainWindow according to body changes
This commit is contained in:
parent
fd03217032
commit
936d4004ff
2 changed files with 5 additions and 5 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -131,7 +131,6 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *e) override;
|
||||
void leaveEventHook(QEvent *e) override;
|
||||
|
||||
void savePosition(Qt::WindowState state = Qt::WindowActive);
|
||||
|
|
Loading…
Add table
Reference in a new issue