diff options
author | Jan Holesovsky <kendy@suse.cz> | 2011-12-27 15:41:22 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2011-12-27 15:41:22 +0100 |
commit | 114b4806e9233140fc42cba0b174a8f21e323a79 (patch) | |
tree | cae82e4ad5e79972b3742fa68d86b7fc3210abb9 /vcl | |
parent | 02870470f069120dc0e65b2cdfef5fd2c426e1e9 (diff) |
Thanks to Ivan Timofeev, fix the 'Preview' checkbox in 'Indexes and Tables...'
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/tabdlg.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/vcl/source/window/tabdlg.cxx b/vcl/source/window/tabdlg.cxx index eaf4a1459e31..9313211701e0 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++; |