2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Allow to resize chats list. One more mode added (narrow chats list).

This commit is contained in:
John Preston
2017-01-14 21:50:16 +03:00
parent 983db3a682
commit 4424dbf64a
33 changed files with 558 additions and 140 deletions

View File

@@ -359,6 +359,7 @@ void MainWindow::setupMain(const MTPUser *self) {
clearWidgets();
_main.create(bodyWidget());
_main->show();
updateControlsGeometry();
if (animated) {
@@ -835,18 +836,6 @@ void MainWindow::closeEvent(QCloseEvent *e) {
void MainWindow::resizeEvent(QResizeEvent *e) {
Platform::MainWindow::resizeEvent(e);
Adaptive::Layout layout = Adaptive::OneColumnLayout;
if (width() > st::adaptiveWideWidth) {
layout = Adaptive::WideLayout;
} else if (width() >= st::adaptiveNormalWidth) {
layout = Adaptive::NormalLayout;
}
if (layout != Global::AdaptiveLayout()) {
Global::SetAdaptiveLayout(layout);
Adaptive::Changed().notify(true);
}
updateControlsGeometry();
}