code: protected void updateFoldingThreshhold() {
  
          int left = estimateRequiredWidth(m_itemsLeft) + estimateRequiredWidth(m_leftButtons);
          int right = estimateRequiredWidth(m_itemsRight) + estimateRequiredWidth(m_rightButtons);
          int requiredWidth = left > right ? left : right;
          if (requiredWidth < 350) {
              // folding not required at any width
              m_foldingThreshhold = 0;
          } else if (requiredWidth < 400) {
              m_foldingThreshhold = 984;
          } else if (requiredWidth <= 520) {
              m_foldingThreshhold = 1240;
          } else {
              // always fold
              m_foldingThreshhold = 10000;
          }
          updateButtonVisibility(Page.getCurrent().getBrowserWindowWidth());
      }
docs: Recalculates the space required by the toolbar buttons.<p>