summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-06-01 10:26:18 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-09-28 08:48:22 +0100
commit048c7974836fb2e1dc66a4267a40ad43546c4c82 (patch)
tree3511e56f3c329538ea36b238826b5b7189920aac /vcl
parenta9ac4d72f3d79ec51c69662c993724479184ec87 (diff)
drop extra padding
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/layout.cxx15
1 files changed, 6 insertions, 9 deletions
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index a48277074a0c..98ed195d8ce8 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -251,20 +251,15 @@ Size VclButtonBox::calculateRequisition() const
if (!nVisibleChildren)
return Size();
- rtl::OString sChildInternalPadX(RTL_CONSTASCII_STRINGPARAM("child-internal-pad-x"));
- sal_Int32 nChildInternalPadX = getWidgetStyleProperty<sal_Int32>(sChildInternalPadX, DEFAULT_CHILD_INTERNAL_PAD_X);
- rtl::OString sChildInternalPadY(RTL_CONSTASCII_STRINGPARAM("child-internal-pad-y"));
- sal_Int32 nChildInternalPadY = getWidgetStyleProperty<sal_Int32>(sChildInternalPadY, DEFAULT_CHILD_INTERNAL_PAD_Y);
- Size aChildPad(nChildInternalPadX, nChildInternalPadY);
-
long nPrimaryDimension =
(getPrimaryDimension(aSize) * nVisibleChildren) +
- (m_nSpacing * (nVisibleChildren-1)) +
- ((getPrimaryDimension(aChildPad)*2) * nVisibleChildren);
+ (m_nSpacing * (nVisibleChildren-1));
setPrimaryDimension(aSize, nPrimaryDimension + m_nSpacing);
long nSecondaryDimension = getSecondaryDimension(aSize);
- setSecondaryDimension(aSize, nSecondaryDimension + getSecondaryDimension(aChildPad)*2);
+ setSecondaryDimension(aSize, nSecondaryDimension);
+
+ fprintf(stderr, "button box asked for %ld %ld\n", aSize.Width(), aSize.Height());
return aSize;
}
@@ -272,6 +267,8 @@ Size VclButtonBox::calculateRequisition() const
void VclButtonBox::setAllocation(const Size &rAllocation)
{
+ fprintf(stderr, "button box got %ld %ld\n", rAllocation.Width(), rAllocation.Height());
+
sal_uInt16 nVisibleChildren = 0;
for (Window *pChild = GetWindow(WINDOW_FIRSTCHILD); pChild; pChild = pChild->GetWindow(WINDOW_NEXT))
{