Пример #1
0
void LLAccordionCtrlTab::draw()
{
	if(mFitPanel)
		LLUICtrl::draw();
	else
	{
		LLRect root_rect = getRootView()->getRect();
		drawChild(root_rect,mHeader);
		drawChild(root_rect,mScrollbar );
		{
			LLRect child_rect;

			S32 width = getRect().getWidth();
			S32 height = getRect().getHeight();

			child_rect.setLeftTopAndSize(
				getPaddingLeft(),
				height - getHeaderHeight() - getPaddingTop(),
				width - getPaddingLeft() - getPaddingRight(), 
				height - getHeaderHeight() - getPaddingTop() - getPaddingBottom() );

			LLLocalClipRect clip(child_rect);
			drawChild(root_rect,mContainerPanel);
		}
	}
}
Пример #2
0
int LinearLayoutActor::animatePaddingIncrease(qreal topIncrease, qreal rightIncrease, qreal bottomIncrease, qreal leftIncrease, int duration, int initialDelay)
{
	QParallelAnimationGroup* groupAnimation = new QParallelAnimationGroup(this);
	groupAnimation->addAnimation( createPaddingAnimation("paddingTop", topIncrease, getPaddingTop(), duration, initialDelay) );
	groupAnimation->addAnimation( createPaddingAnimation("paddingRight", rightIncrease, getPaddingRight(), duration, initialDelay) );
	groupAnimation->addAnimation( createPaddingAnimation("paddingBottom", bottomIncrease, getPaddingBottom(), duration, initialDelay) );
	groupAnimation->addAnimation( createPaddingAnimation("paddingLeft", leftIncrease, getPaddingLeft(), duration, initialDelay) );

	groupAnimation->start();
	return VisualizationSpeed::getInstance().adjust(duration);
}
Пример #3
0
void LLAccordionCtrlTab::adjustContainerPanel	()
{
	S32 width = getRect().getWidth();
	S32 height = getRect().getHeight();

	LLRect child_rect;
	child_rect.setLeftTopAndSize(
		getPaddingLeft(),
		height - getHeaderHeight() - getPaddingTop(),
		width - getPaddingLeft() - getPaddingRight(), 
		height - getHeaderHeight() - getPaddingTop() - getPaddingBottom() );

	adjustContainerPanel(child_rect);
}
Пример #4
0
void	LLAccordionCtrlTab::onScrollPosChangeCallback(S32, LLScrollbar*)
{
	LLRect child_rect;

	S32 width = getRect().getWidth();
	S32 height = getRect().getHeight();

	child_rect.setLeftTopAndSize(
		getPaddingLeft(),
		height - getHeaderHeight() - getPaddingTop(),
		width - getPaddingLeft() - getPaddingRight(), 
		height - getHeaderHeight() - getPaddingTop() - getPaddingBottom() );

	updateLayout(child_rect);
}
Пример #5
0
void LLAccordionCtrlTab::reshape(S32 width, S32 height, BOOL called_from_parent /* = TRUE */)
{
	LLRect headerRect;

	headerRect.setLeftTopAndSize(
		0,height,width,HEADER_HEIGHT);
	mHeader->setRect(headerRect);
	mHeader->reshape(headerRect.getWidth(), headerRect.getHeight());

	if(!mDisplayChildren)
		return;

	LLRect childRect;

	childRect.setLeftTopAndSize(
		getPaddingLeft(),
		height - getHeaderHeight() - getPaddingTop(),
		width - getPaddingLeft() - getPaddingRight(), 
		height - getHeaderHeight() - getPaddingTop() - getPaddingBottom() );

	adjustContainerPanel(childRect);
}
float ofxDOMLayoutHelper::getPaddingHorizontal(DOM::Element *e){
	return getPaddingLeft(e) + getPaddingRight(e);
}