- Timestamp:
- Oct 17, 2009, 2:42:39 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets/FontDialog.java
r14 r208 119 119 fontDlg.cbSize = FONTDLG.sizeof; 120 120 //Init from FATTRS 121 fontDlg.fl = OS.FNTS_CENTER |OS.FNTS_INITFROMFATTRS;121 fontDlg.fl = OS.FNTS_CENTER; 122 122 //Size fontname buffer 123 123 fontDlg.usFamilyBufLen = OS.FACESIZE; 124 124 125 //Fontname buffer 125 126 byte[] szCurrentFont = new byte[OS.FACESIZE]; 126 byte[] buffer = fontData.getName().getBytes(); 127 for(int i=0;i<buffer.length&&i<szCurrentFont.length;i++) 128 szCurrentFont[i] = buffer[i]; 127 128 if (fontData != null) { 129 fontDlg.fl |= OS.FNTS_INITFROMFATTRS; 130 byte[] buffer = fontData.getName().getBytes(); 131 for(int i=0;i<buffer.length&&i<szCurrentFont.length;i++) 132 szCurrentFont[i] = buffer[i]; 133 fontDlg.fAttrs = fontData.getFAttrs(); 134 } else { 135 szCurrentFont[0] = ' '; 136 } 129 137 fontDlg.pszFamilyname = new PSZ(szCurrentFont); 130 138 //Foreground color … … 136 144 //Text shown in the preview area 137 145 fontDlg.pszPreview = new PSZ("Eclipse/2"); 138 if (fontData != null) {139 fontDlg.fAttrs = fontData.getFAttrs();140 }141 146 int rc = OS.WinFontDlg(OS.HWND_DESKTOP, hwndOwner, fontDlg); 142 147 if(fontDlg.lReturn == OS.DID_OK){
Note:
See TracChangeset
for help on using the changeset viewer.