void WNavigationBar::undoExpandContents() { WContainerWidget *contents = resolve<WContainerWidget *>("contents"); WInteractWidget *collapseButton = resolve<WInteractWidget *>("collapse-button"); WInteractWidget *expandButton = resolve<WInteractWidget *>("expand-button"); collapseButton->hide(); expandButton->show(); if (!animatedResponsive()) contents->hide(); else contents->show(); /* We are collapsed only in appearance */ }
void WNavigationBar::expandContents() { WContainerWidget *contents = resolve<WContainerWidget *>("contents"); WInteractWidget *collapseButton = resolve<WInteractWidget *>("collapse-button"); WInteractWidget *expandButton = resolve<WInteractWidget *>("expand-button"); collapseButton->show(); expandButton->hide(); if (!animatedResponsive()) contents->show(); else { if (canOptimizeUpdates()) contents->show(); else contents->animateShow(WAnimation(WAnimation::SlideInFromTop, WAnimation::Ease)); } }