summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-02-15 12:38:42 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-02-15 12:38:42 +0000
commit1ccbb620946c7032c57054550b08ad5362fe1c3f (patch)
treea81615fef974bce455ceb76e9e8f3a39e1c9cd6f /vcl/source
parent158aee9ad3e8d7dbb58381fc260ebdb53466ce22 (diff)
tabpages size req not factoring in border width
Change-Id: Ie7396b63a64e89bb7aa7c0e284faab7ed380c4c1
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/control/tabctrl.cxx3
-rw-r--r--vcl/source/window/tabpage.cxx2
2 files changed, 3 insertions, 2 deletions
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 28c81af5813e..04afb7af85df 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -29,6 +29,7 @@
#include "vcl/tabpage.hxx"
#include "vcl/tabctrl.hxx"
#include "vcl/controllayout.hxx"
+#include "vcl/layout.hxx"
#include "vcl/lstbox.hxx"
#include "controldata.hxx"
@@ -2219,7 +2220,7 @@ Size TabControl::calculateRequisition() const
if (!pPage)
continue;
- Size aPageSize(pPage->GetOptimalSize());
+ Size aPageSize(VclContainer::getLayoutRequisition(*pPage));
if (aPageSize.Width() > aOptimalPageSize.Width())
aOptimalPageSize.Width() = aPageSize.Width();
diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx
index b15d9c1ea09a..33a0b8525ba5 100644
--- a/vcl/source/window/tabpage.cxx
+++ b/vcl/source/window/tabpage.cxx
@@ -210,7 +210,7 @@ bool TabPage::isLayoutEnabled() const
Size TabPage::GetOptimalSize() const
{
if (isLayoutEnabled())
- return GetWindow(WINDOW_FIRSTCHILD)->GetOptimalSize();
+ return VclContainer::getLayoutRequisition(*GetWindow(WINDOW_FIRSTCHILD));
return getLegacyBestSizeForChildren(*this);
}