summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-12-27 15:41:22 +0100
committerJan Holesovsky <kendy@suse.cz>2011-12-27 15:46:05 +0100
commitf29c4dca4a451d28d5fef06c966725636e542eeb (patch)
treee1b588b2c9e6e72821c2fbff44dceeabc805e340 /vcl
parentac6b7001773a76a210b26a1f2231c1ff5f06e91c (diff)
Thanks to Ivan Timofeev, fix the 'Preview' checkbox in 'Indexes and Tables...'
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/tabdlg.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/vcl/source/window/tabdlg.cxx b/vcl/source/window/tabdlg.cxx
index ba67ed1dfa1f..7c68367ec3ba 100644
--- a/vcl/source/window/tabdlg.cxx
+++ b/vcl/source/window/tabdlg.cxx
@@ -61,12 +61,11 @@ void TabDialog::ImplPosControls()
pTabControl = (TabControl*)pChild;
else if ( pTabControl )
{
- long nTxtWidth = pChild->GetCtrlTextWidth( pChild->GetText() );
- nTxtWidth += IMPL_EXTRA_BUTTON_WIDTH;
+ Size aOptimalSize( pChild->GetOptimalSize( WINDOWSIZE_PREFERRED ) );
+ long nTxtWidth = aOptimalSize.Width();
if ( nTxtWidth > aCtrlSize.Width() )
aCtrlSize.Width() = nTxtWidth;
- long nTxtHeight = pChild->GetTextHeight();
- nTxtHeight += IMPL_EXTRA_BUTTON_HEIGHT;
+ long nTxtHeight = aOptimalSize.Height();
if ( nTxtHeight > aCtrlSize.Height() )
aCtrlSize.Height() = nTxtHeight;
nDownCtrl++;