2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 06:55:58 +00:00

Don't expand minimum window size for folders

Turn them into horizontal automatically instead
This commit is contained in:
Ilya Fedin
2024-11-17 07:38:48 +04:00
committed by John Preston
parent 702aa944dd
commit 6c64c22f83
6 changed files with 29 additions and 9 deletions

View File

@@ -844,7 +844,16 @@ void SetupTopContent(
}
void SetupView(not_null<Ui::VerticalLayout*> content) {
void SetupView(
not_null<Window::SessionController*> controller,
not_null<Ui::VerticalLayout*> content) {
const auto wrap = content->add(
object_ptr<Ui::SlideWrap<Ui::VerticalLayout>>(
content,
object_ptr<Ui::VerticalLayout>(content)));
wrap->toggleOn(controller->enoughSpaceForFiltersValue());
content = wrap->entity();
Ui::AddDivider(content);
Ui::AddSkip(content);
Ui::AddSubsectionTitle(content, tr::lng_filters_view_subtitle());
@@ -900,7 +909,7 @@ void Folders::setupContent(not_null<Window::SessionController*> controller) {
_save = SetupFoldersContent(controller, content);
SetupView(content);
SetupView(controller, content);
Ui::ResizeFitChild(this, content);
}