Kaydet (Commit) f29c4dca authored tarafından Jan Holesovsky's avatar Jan Holesovsky

Thanks to Ivan Timofeev, fix the 'Preview' checkbox in 'Indexes and Tables...'

üst ac6b7001
...@@ -106,7 +106,7 @@ TabDialog DLG_MULTI_TOX ...@@ -106,7 +106,7 @@ TabDialog DLG_MULTI_TOX
}; };
CheckBox CB_SHOWEXAMPLE CheckBox CB_SHOWEXAMPLE
{ {
Size = MAP_APPFONT ( 200, 10 ) ; Size = MAP_APPFONT ( 45, 10 ) ;
Text [ en-US ] = "Preview"; Text [ en-US ] = "Preview";
}; };
Text [ en-US ] = "Insert Index/Table"; Text [ en-US ] = "Insert Index/Table";
......
...@@ -61,12 +61,11 @@ void TabDialog::ImplPosControls() ...@@ -61,12 +61,11 @@ void TabDialog::ImplPosControls()
pTabControl = (TabControl*)pChild; pTabControl = (TabControl*)pChild;
else if ( pTabControl ) else if ( pTabControl )
{ {
long nTxtWidth = pChild->GetCtrlTextWidth( pChild->GetText() ); Size aOptimalSize( pChild->GetOptimalSize( WINDOWSIZE_PREFERRED ) );
nTxtWidth += IMPL_EXTRA_BUTTON_WIDTH; long nTxtWidth = aOptimalSize.Width();
if ( nTxtWidth > aCtrlSize.Width() ) if ( nTxtWidth > aCtrlSize.Width() )
aCtrlSize.Width() = nTxtWidth; aCtrlSize.Width() = nTxtWidth;
long nTxtHeight = pChild->GetTextHeight(); long nTxtHeight = aOptimalSize.Height();
nTxtHeight += IMPL_EXTRA_BUTTON_HEIGHT;
if ( nTxtHeight > aCtrlSize.Height() ) if ( nTxtHeight > aCtrlSize.Height() )
aCtrlSize.Height() = nTxtHeight; aCtrlSize.Height() = nTxtHeight;
nDownCtrl++; nDownCtrl++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment