From 3845985a6ba6ad000151a9d99b4d44ac68cc44ce Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 6 Dec 2017 11:05:18 +0400 Subject: [PATCH] Fix third column appearing on window resize. --- Telegram/SourceFiles/info/info_layer_widget.cpp | 11 ++++++++++- Telegram/SourceFiles/window/window_controller.cpp | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/info/info_layer_widget.cpp b/Telegram/SourceFiles/info/info_layer_widget.cpp index 50d2cb8511..4e75a9716b 100644 --- a/Telegram/SourceFiles/info/info_layer_widget.cpp +++ b/Telegram/SourceFiles/info/info_layer_widget.cpp @@ -86,6 +86,11 @@ void LayerWidget::parentResized() { Window::SectionShow::Way::Forward, anim::type::instant, anim::activation::background)); + // + // There was a layout logic which caused layer info to become a + // third column info if the window size allows, but it was decided + // to keep layer info and third column info separated. + // //} else if (_controller->canShowThirdSectionWithoutResize()) { // takeToThirdSection(); } else { @@ -98,7 +103,11 @@ void LayerWidget::parentResized() { bool LayerWidget::takeToThirdSection() { return false; - + // + // There was a layout logic which caused layer info to become a + // third column info if the window size allows, but it was decided + // to keep layer info and third column info separated. + // //Ui::FocusPersister persister(this); //auto localCopy = _controller; //auto memento = MoveMemento(std::move(_content)); diff --git a/Telegram/SourceFiles/window/window_controller.cpp b/Telegram/SourceFiles/window/window_controller.cpp index a658c6e027..2255dd2272 100644 --- a/Telegram/SourceFiles/window/window_controller.cpp +++ b/Telegram/SourceFiles/window/window_controller.cpp @@ -395,7 +395,7 @@ void Controller::showSection( const SectionShow ¶ms) { if (App::wnd()->showSectionInExistingLayer( &memento, - params)) { + params) && !params.thirdColumn) { return; } App::main()->showSection(std::move(memento), params);