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:46:05 +0100 |
commit | f29c4dca4a451d28d5fef06c966725636e542eeb (patch) | |
tree | e1b588b2c9e6e72821c2fbff44dceeabc805e340 | |
parent | ac6b7001773a76a210b26a1f2231c1ff5f06e91c (diff) |
Thanks to Ivan Timofeev, fix the 'Preview' checkbox in 'Indexes and Tables...'
-rw-r--r-- | sw/source/ui/index/cnttab.src | 2 | ||||
-rw-r--r-- | vcl/source/window/tabdlg.cxx | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/sw/source/ui/index/cnttab.src b/sw/source/ui/index/cnttab.src index 71f034d55a7b..c2ce533be1fb 100644 --- a/sw/source/ui/index/cnttab.src +++ b/sw/source/ui/index/cnttab.src @@ -106,7 +106,7 @@ TabDialog DLG_MULTI_TOX }; CheckBox CB_SHOWEXAMPLE { - Size = MAP_APPFONT ( 200, 10 ) ; + Size = MAP_APPFONT ( 45, 10 ) ; Text [ en-US ] = "Preview"; }; Text [ en-US ] = "Insert Index/Table"; 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++; |