implemented centered button box mode
Change-Id: I17b60440297d4eecca0737f811f6e56cc5bc91ce
This commit is contained in:
@@ -569,6 +569,15 @@ void VclButtonBox::setAllocation(const Size &rAllocation)
|
||||
setPrimaryCoordinate(aMainGroupPos, nSpacing);
|
||||
}
|
||||
break;
|
||||
case VCL_BUTTONBOX_CENTER:
|
||||
if (!aReq.m_aMainGroupDimensions.empty())
|
||||
{
|
||||
long nMainPrimaryDimension = getPrimaryDimension(
|
||||
addSpacing(aReq.m_aMainGroupSize, aReq.m_aMainGroupDimensions.size()));
|
||||
long nExtraSpace = nAllocPrimaryDimension - nMainPrimaryDimension;
|
||||
setPrimaryCoordinate(aMainGroupPos, nExtraSpace/2);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
SAL_WARN("vcl.layout", "todo unimplemented layout style");
|
||||
case VCL_BUTTONBOX_DEFAULT_STYLE:
|
||||
|
Reference in New Issue
Block a user