mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-04-01 00:08:02 +00:00
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());
|
||||
|
||||
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…
Reference in New Issue
Block a user