2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-01 23:25:15 +00:00

Support any size in the tabbed selector.

This commit is contained in:
John Preston
2017-11-12 13:54:18 +04:00
parent 5c12b0e5fa
commit 0255d0c59e
16 changed files with 368 additions and 238 deletions

View File

@@ -3388,10 +3388,14 @@ void MainWidget::updateControlsGeometry() {
if (Adaptive::ThreeColumn()) {
if (!_thirdSection
&& !_controller->takeThirdSectionFromLayer()) {
auto params = Window::SectionShow(
Window::SectionShow::Way::ClearStack,
anim::type::instant,
anim::activation::background);
if (Auth().data().tabbedSelectorSectionEnabled()) {
_history->pushTabbedSelectorToThirdSection();
_history->pushTabbedSelectorToThirdSection(params);
} else if (Auth().data().thirdSectionInfoEnabled()) {
_history->pushInfoToThirdSection();
_history->pushInfoToThirdSection(params);
}
}
} else {
@@ -3507,18 +3511,17 @@ void MainWidget::updateThirdColumnToCurrentPeer(
_thirdSection->createMemento());
}
};
auto params = Window::SectionShow(
Window::SectionShow::Way::ClearStack,
anim::type::instant,
anim::activation::background);
auto switchInfoFast = [&] {
saveOldThirdSection();
_controller->showPeerInfo(
peer,
SectionShow(
SectionShow::Way::ClearStack,
anim::type::instant,
anim::activation::background));
_controller->showPeerInfo(peer, params);
};
auto switchTabbedFast = [&] {
saveOldThirdSection();
_history->pushTabbedSelectorToThirdSection();
_history->pushTabbedSelectorToThirdSection(params);
};
if (Adaptive::ThreeColumn()
&& Auth().data().tabbedSelectorSectionEnabled()