fixing auto wrap and default font

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26500 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2004-03-30 18:29:00 +00:00
parent e1983ab588
commit 413844c2d4

View File

@@ -600,7 +600,7 @@ OSStatus mUPOpenControl(STPTextPaneVars* &handle, ControlRef theControl, long wx
&varsp->fTXNRec, &varsp->fTXNFrame, (TXNObjectRefcon) varsp)); &varsp->fTXNRec, &varsp->fTXNFrame, (TXNObjectRefcon) varsp));
TXNControlTag iControlTags[3] = { kTXNDoFontSubstitution, kTXNWordWrapStateTag }; TXNControlTag iControlTags[3] = { kTXNDoFontSubstitution, kTXNWordWrapStateTag };
TXNControlData iControlData[3] = { {false}, {kTXNAutoWrap} }; TXNControlData iControlData[3] = { {false}, {kTXNNoAutoWrap} };
int toptag = 2 ; int toptag = 2 ;
#if TARGET_API_MAC_OSX #if TARGET_API_MAC_OSX
iControlTags[2] = kTXNVisibilityTag ; iControlTags[2] = kTXNVisibilityTag ;
@@ -608,9 +608,14 @@ OSStatus mUPOpenControl(STPTextPaneVars* &handle, ControlRef theControl, long wx
toptag++ ; toptag++ ;
#endif #endif
if ( (wxStyle & wxTE_MULTILINE) && (wxStyle & wxTE_DONTWRAP) ) if ( wxStyle & wxTE_MULTILINE )
iControlData[1].uValue = kTXNNoAutoWrap ; {
if (wxStyle & wxTE_DONTWRAP)
iControlData[1].uValue = kTXNNoAutoWrap ;
else
iControlData[1].uValue = kTXNAutoWrap ;
}
verify_noerr( TXNSetTXNObjectControls( varsp->fTXNRec, false, toptag, verify_noerr( TXNSetTXNObjectControls( varsp->fTXNRec, false, toptag,
iControlTags, iControlData )) ; iControlTags, iControlData )) ;
@@ -618,7 +623,7 @@ OSStatus mUPOpenControl(STPTextPaneVars* &handle, ControlRef theControl, long wx
SInt16 fontSize ; SInt16 fontSize ;
Style fontStyle ; Style fontStyle ;
GetThemeFont(kThemeSmallSystemFont , GetApplicationScript() , fontName , &fontSize , &fontStyle ) ; GetThemeFont(kThemeSystemFont , GetApplicationScript() , fontName , &fontSize , &fontStyle ) ;
TXNTypeAttributes typeAttr[] = TXNTypeAttributes typeAttr[] =
{ {