diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-09-09 14:15:14 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-09-09 14:19:12 +0100 |
commit | 6e836a56ee42f0cfbd69f068ccdcd9a6085e60f0 (patch) | |
tree | 2ae48d6e999e5d218e68af129b78dc90062bc7aa /vcl | |
parent | tubes: build fixes. (diff) | |
download | core-6e836a56ee42f0cfbd69f068ccdcd9a6085e60f0.tar.gz core-6e836a56ee42f0cfbd69f068ccdcd9a6085e60f0.zip |
implemented centered button box mode
Change-Id: I17b60440297d4eecca0737f811f6e56cc5bc91ce
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/layout.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 30a6c84a96b3..7bfcb8cd1caa 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -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: |