Example #1
0
void WNavigationBar::collapseContents()
{
  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 {
    if (canOptimizeUpdates())
      contents->show(); /* We are collapsed only in appearance */
    else
      contents->animateHide(WAnimation(WAnimation::SlideInFromTop,
				       WAnimation::Ease));
  }
}