summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-04-24 19:28:38 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-04-24 19:31:55 +0100
commit0d501c40af07fe33e16d16b8acdd3c7a93afa95e (patch)
tree3136f0a25fbf3e49199565f45e3e0b119102e55f /svtools
parent95f2f5f4d1a6d94788ea4e3905c25ddd69eb3d9b (diff)
add border width to optimal size when present
Change-Id: I37c396c3c61521e140d290fd8f17220f60c43284
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/contnr/treelistbox.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index a418330ba887..ba81f9ea9529 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -3418,6 +3418,12 @@ Size SvTreeListBox::GetOptimalSize() const
Size aRet(0, getPreferredDimensions(aWidths));
for (size_t i = 0; i < aWidths.size(); ++i)
aRet.Width() += aWidths[i];
+ if (GetStyle() & WB_BORDER)
+ {
+ const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
+ aRet.Width() += rStyleSettings.GetBorderSize() * 2;
+ aRet.Height() += rStyleSettings.GetBorderSize() * 2;
+ }
return aRet;
}