2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Move filters side bar inside bodyWidget.

This commit is contained in:
John Preston
2020-03-06 15:37:48 +04:00
parent 2cefccc6eb
commit c279986493
6 changed files with 33 additions and 20 deletions

View File

@@ -799,7 +799,21 @@ void MainWindow::updateControlsGeometry() {
auto body = bodyWidget()->rect();
if (_passcodeLock) _passcodeLock->setGeometry(body);
if (_main) _main->setGeometry(body);
auto mainLeft = 0;
auto mainWidth = body.width();
if (const auto session = sessionController()) {
if (const auto skip = session->filtersWidth()) {
mainLeft += skip;
mainWidth -= skip;
}
}
if (_main) {
_main->setGeometry({
body.x() + mainLeft,
body.y(),
mainWidth,
body.height() });
}
if (_intro) _intro->setGeometry(body);
if (_layer) _layer->setGeometry(body);
if (_mediaPreview) _mediaPreview->setGeometry(body);