2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Show info media overview using Overview::Layout.

This commit is contained in:
John Preston
2017-10-04 18:15:08 +01:00
parent 7905694b31
commit ecbc0ae57e
9 changed files with 546 additions and 14 deletions

View File

@@ -79,6 +79,9 @@ void WrapWidget::createTabs() {
sections.push_back(lang(lng_profile_info_section).toUpper());
sections.push_back(lang(lng_info_tab_media).toUpper());
_topTabs->setSections(sections);
_topTabs->setActiveSection(static_cast<int>(_tab));
_topTabs->finishAnimating();
_topTabs->sectionActivated()
| rpl::map([](int index) { return static_cast<Tab>(index); })
| rpl::start_with_next(
@@ -111,6 +114,9 @@ void WrapWidget::forceContentRepaint() {
}
void WrapWidget::showTab(Tab tab) {
if (_tab == tab) {
return;
}
Expects(_content != nullptr);
auto direction = (tab > _tab)
? SlideDirection::FromRight
@@ -132,6 +138,7 @@ void WrapWidget::showTab(Tab tab) {
showAnimated(direction, animationParams);
_anotherTabMemento = std::move(newAnotherMemento);
_tab = tab;
}
void WrapWidget::setupTabbedTop(const Section &section) {
@@ -241,7 +248,6 @@ void WrapWidget::finishShowContent() {
_topShadow->finishAnimating();
if (_topTabs) {
_topTabs->raise();
_topTabs->finishAnimating();
}
}