void LLPanelInventoryListItemBase::reshapeLeftWidgets() { S32 widget_left = 0; mLeftWidgetsWidth = 0; widget_array_t::const_iterator it = mLeftSideWidgets.begin(); const widget_array_t::const_iterator it_end = mLeftSideWidgets.end(); for( ; it_end != it; ++it) { LLUICtrl* widget = *it; if(!widget->getVisible()) { continue; } LLRect widget_rect(widget->getRect()); widget_rect.setLeftTopAndSize(widget_left, widget_rect.mTop, widget_rect.getWidth(), widget_rect.getHeight()); widget->setShape(widget_rect); widget_left += widget_rect.getWidth() + getWidgetSpacing(); mLeftWidgetsWidth = widget_rect.mRight; } }
void LLPanelInventoryListItemBase::reshapeRightWidgets() { S32 widget_right = getLocalRect().getWidth(); S32 widget_left = widget_right; widget_array_t::const_reverse_iterator it = mRightSideWidgets.rbegin(); const widget_array_t::const_reverse_iterator it_end = mRightSideWidgets.rend(); for( ; it_end != it; ++it) { LLUICtrl* widget = *it; if(!widget->getVisible()) { continue; } LLRect widget_rect(widget->getRect()); widget_left = widget_right - widget_rect.getWidth(); widget_rect.setLeftTopAndSize(widget_left, widget_rect.mTop, widget_rect.getWidth(), widget_rect.getHeight()); widget->setShape(widget_rect); widget_right = widget_left - getWidgetSpacing(); } mRightWidgetsWidth = getLocalRect().getWidth() - widget_left; }