Index: compare/org/eclipse/compare/EditionSelectionDialog.java =================================================================== RCS file: /home/eclipse/org.eclipse.compare/compare/org/eclipse/compare/EditionSelectionDialog.java,v retrieving revision 1.35 diff -u -r1.35 EditionSelectionDialog.java --- compare/org/eclipse/compare/EditionSelectionDialog.java 23 Oct 2002 22:37:17 -0000 1.35 +++ compare/org/eclipse/compare/EditionSelectionDialog.java 28 Nov 2002 23:49:03 -0000 @@ -22,6 +22,7 @@ import org.eclipse.swt.SWT; import org.eclipse.swt.events.*; +import org.eclipse.swt.graphics.Font; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Widget; @@ -37,6 +38,7 @@ import org.eclipse.swt.widgets.Button; import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.jface.resource.JFaceResources; import org.eclipse.jface.viewers.*; import org.eclipse.jface.util.Assert; import org.eclipse.jface.dialogs.*; @@ -645,6 +647,7 @@ * Creates SWT control tree. */ protected synchronized Control createDialogArea(Composite parent) { + final Font font = parent.getFont(); getShell().setText(Utilities.getString(fBundle, "title")); //$NON-NLS-1$ @@ -678,9 +681,11 @@ } ); + fMemberTable.setFont(font); fMemberPane.setContent(fMemberTable); fEditionPane= new CompareViewerPane(hsplitter, SWT.BORDER | SWT.FLAT); + fEditionPane.setFont(font); } else { if (fStructureCompare) { // we need two panes: the left for the elements, the right one for the structured diff @@ -689,8 +694,14 @@ fEditionPane= new CompareViewerPane(hsplitter, SWT.BORDER | SWT.FLAT); fStructuredComparePane= new CompareViewerSwitchingPane(hsplitter, SWT.BORDER | SWT.FLAT, true) { protected Viewer getViewer(Viewer oldViewer, Object input) { - if (input instanceof ICompareInput) - return CompareUIPlugin.findStructureViewer(oldViewer, (ICompareInput)input, this, fCompareConfiguration); + if (input instanceof ICompareInput) { + Viewer viewer = CompareUIPlugin.findStructureViewer(oldViewer, (ICompareInput)input, this, fCompareConfiguration); + + if (viewer != null) + viewer.getControl().setFont(font); + + return viewer; + } return null; } }; @@ -701,6 +712,7 @@ } } ); + fStructuredComparePane.setFont(font); } else { // only a single pane showing the editions fEditionPane= new CompareViewerPane(vsplitter, SWT.BORDER | SWT.FLAT); @@ -715,6 +727,7 @@ } fEditionTree= new Tree(fEditionPane, SWT.H_SCROLL + SWT.V_SCROLL); + fEditionTree.setFont(font); fEditionTree.addSelectionListener( new SelectionAdapter() { // public void widgetDefaultSelected(SelectionEvent e) { @@ -726,6 +739,7 @@ } ); fEditionPane.setContent(fEditionTree); + fEditionPane.setFont(font); // now start the thread (and forget about it) if (fThread != null) { @@ -735,9 +749,15 @@ fContentPane= new CompareViewerSwitchingPane(vsplitter, SWT.BORDER | SWT.FLAT) { protected Viewer getViewer(Viewer oldViewer, Object input) { - return CompareUIPlugin.findContentViewer(oldViewer, input, this, fCompareConfiguration); + Viewer viewer = CompareUIPlugin.findContentViewer(oldViewer, input, this, fCompareConfiguration); + + if (viewer != null) + viewer.getControl().setFont(JFaceResources.getTextFont()); + + return viewer; } }; + fContentPane.setFont(font); vsplitter.setWeights(new int[] { 30, 70 }); return vsplitter; Index: compare/org/eclipse/compare/contentmergeviewer/ContentMergeViewer.java =================================================================== RCS file: /home/eclipse/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ContentMergeViewer.java,v retrieving revision 1.25 diff -u -r1.25 ContentMergeViewer.java --- compare/org/eclipse/compare/contentmergeviewer/ContentMergeViewer.java 23 Oct 2002 22:37:17 -0000 1.25 +++ compare/org/eclipse/compare/contentmergeviewer/ContentMergeViewer.java 28 Nov 2002 23:49:03 -0000 @@ -631,7 +631,8 @@ * @return the new control */ protected final Control buildControl(Composite parent) { - + Font font = parent.getFont(); + fComposite= new Composite(parent, fStyles) { public boolean setFocus() { return internalSetFocus(); @@ -642,11 +643,14 @@ hookControl(fComposite); // hook help & dispose listener fComposite.setLayout(new ContentMergeViewerLayout()); + fComposite.setFont(font); int style= SWT.SHADOW_OUT; fAncestorLabel= new CLabel(fComposite, style); + fAncestorLabel.setFont(font); fLeftLabel= new CLabel(fComposite, style); + fLeftLabel.setFont(font); new Resizer(fLeftLabel, VERTICAL); fDirectionLabel= new CLabel(fComposite, style); @@ -654,6 +658,7 @@ new Resizer(fDirectionLabel, HORIZONTAL | VERTICAL); fRightLabel= new CLabel(fComposite, style); + fRightLabel.setFont(font); new Resizer(fRightLabel, VERTICAL); if (fCenter == null || fCenter.isDisposed()) Index: compare/org/eclipse/compare/internal/AddFromHistoryDialog.java =================================================================== RCS file: /home/eclipse/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryDialog.java,v retrieving revision 1.10 diff -u -r1.10 AddFromHistoryDialog.java --- compare/org/eclipse/compare/internal/AddFromHistoryDialog.java 31 May 2002 17:07:23 -0000 1.10 +++ compare/org/eclipse/compare/internal/AddFromHistoryDialog.java 28 Nov 2002 23:49:04 -0000 @@ -12,6 +12,7 @@ import org.eclipse.jface.dialogs.*; import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.jface.resource.JFaceResources; import org.eclipse.jface.viewers.Viewer; import org.eclipse.core.resources.*; @@ -170,6 +171,7 @@ } protected synchronized Control createDialogArea(Composite parent) { + Font font = parent.getFont(); getShell().setText(Utilities.getString(fBundle, "title")); //$NON-NLS-1$ @@ -199,12 +201,15 @@ layout.numColumns= 1; c.setLayout(layout); Label l1= new Label(c, SWT.NONE); + l1.setFont(font); l1.setText(Utilities.getString(fBundle, "memberDescription")); //$NON-NLS-1$ fMemberPane= new CompareViewerPane(c, SWT.BORDER | SWT.FLAT); GridData gd= new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL); fMemberPane.setLayoutData(gd); + fMemberPane.setFont(font); fMemberTable= new Table(fMemberPane, SWT.CHECK | SWT.H_SCROLL | SWT.V_SCROLL); + fMemberTable.setFont(font); fMemberTable.addSelectionListener( new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { @@ -236,10 +241,12 @@ layout.numColumns= 1; c.setLayout(layout); Label l2= new Label(c, SWT.NONE); + l2.setFont(font); l2.setText(Utilities.getString(fBundle, "editionDescription")); //$NON-NLS-1$ fEditionPane= new CompareViewerPane(c, SWT.BORDER | SWT.FLAT); gd= new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL); fEditionPane.setLayoutData(gd); + fEditionPane.setFont(font); fEditionTree= new Tree(fEditionPane, SWT.H_SCROLL | SWT.V_SCROLL); fEditionTree.addSelectionListener( @@ -250,12 +257,20 @@ } ); fEditionPane.setContent(fEditionTree); + fEditionTree.setFont(font); fContentPane= new CompareViewerSwitchingPane(vsplitter, SWT.BORDER | SWT.FLAT) { protected Viewer getViewer(Viewer oldViewer, Object input) { - return CompareUIPlugin.findContentViewer(oldViewer, input, this, fCompareConfiguration); + Viewer viewer = CompareUIPlugin.findContentViewer(oldViewer, input, this, fCompareConfiguration); + + if (viewer != null) + viewer.getControl().setFont(JFaceResources.getTextFont()); + + return viewer; } }; + fContentPane.setFont(font); + vsplitter.setWeights(new int[] { 30, 70 }); return vsplitter; Index: compare/org/eclipse/compare/internal/ComparePreferencePage.java =================================================================== RCS file: /home/eclipse/org.eclipse.compare/compare/org/eclipse/compare/internal/ComparePreferencePage.java,v retrieving revision 1.15 diff -u -r1.15 ComparePreferencePage.java --- compare/org/eclipse/compare/internal/ComparePreferencePage.java 26 Nov 2002 10:11:42 -0000 1.15 +++ compare/org/eclipse/compare/internal/ComparePreferencePage.java 28 Nov 2002 23:49:04 -0000 @@ -11,6 +11,7 @@ import org.eclipse.swt.widgets.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.events.*; +import org.eclipse.swt.graphics.Font; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.Color; @@ -190,6 +191,7 @@ TabFolder folder= new TabFolder(parent, SWT.NONE); folder.setLayout(new TabFolderLayout()); folder.setLayoutData(new GridData(GridData.FILL_BOTH)); + folder.setFont(parent.getFont()); TabItem item= new TabItem(folder, SWT.NONE); item.setText(Utilities.getString("ComparePreferencePage.generalTab.label")); //$NON-NLS-1$ @@ -213,6 +215,7 @@ GridLayout layout= new GridLayout(); layout.numColumns= 1; composite.setLayout(layout); + composite.setFont(parent.getFont()); addCheckBox(composite, "ComparePreferencePage.structureCompare.label", OPEN_STRUCTURE_COMPARE, 0); //$NON-NLS-1$ @@ -224,11 +227,13 @@ } private Control createTextComparePage(Composite parent) { + Font font = parent.getFont(); Composite composite= new Composite(parent, SWT.NULL); GridLayout layout= new GridLayout(); layout.numColumns= 1; composite.setLayout(layout); + composite.setFont(font); addCheckBox(composite, "ComparePreferencePage.synchronizeScrolling.label", SYNCHRONIZE_SCROLLING, 0); //$NON-NLS-1$ @@ -243,6 +248,7 @@ Label previewLabel= new Label(composite, SWT.NULL); previewLabel.setText(Utilities.getString("ComparePreferencePage.preview.label")); //$NON-NLS-1$ + previewLabel.setFont(font); Control previewer= createPreviewer(composite); GridData gd= new GridData(GridData.FILL_BOTH); @@ -294,6 +300,7 @@ String label= Utilities.getString(labelKey); Group group= new Group(parent, SWT.NULL); + group.setFont(parent.getFont()); group.setText(label); GridLayout layout= new GridLayout(); layout.numColumns= 3; @@ -319,6 +326,7 @@ gd.horizontalIndent= indentation; gd.horizontalSpan= 2; checkBox.setLayoutData(gd); + checkBox.setFont(parent.getFont()); if (fCheckBoxListener == null) { fCheckBoxListener= new SelectionAdapter() { Index: compare/org/eclipse/compare/internal/patch/InputPatchPage.java =================================================================== RCS file: /home/eclipse/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java,v retrieving revision 1.8 diff -u -r1.8 InputPatchPage.java --- compare/org/eclipse/compare/internal/patch/InputPatchPage.java 23 Oct 2002 22:37:17 -0000 1.8 +++ compare/org/eclipse/compare/internal/patch/InputPatchPage.java 28 Nov 2002 23:49:04 -0000 @@ -10,6 +10,7 @@ import org.eclipse.swt.SWT; import org.eclipse.swt.dnd.*; import org.eclipse.swt.events.*; +import org.eclipse.swt.graphics.Font; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; @@ -75,14 +76,16 @@ } public void createControl(Composite parent) { - + Font font = parent.getFont(); Composite composite= new Composite(parent, SWT.NULL); composite.setLayout(new GridLayout()); composite.setLayoutData(new GridData(/* GridData.VERTICAL_ALIGN_FILL | */ GridData.HORIZONTAL_ALIGN_FILL)); + composite.setFont(font); setControl(composite); Label l= new Label(composite, SWT.NONE); // a spacer l.setText(PatchMessages.getString("InputPatchPage.SelectInput")); //$NON-NLS-1$ + l.setFont(font); buildInputGroup(composite); new Label(composite, SWT.NONE); // a spacer @@ -250,8 +253,9 @@ * Create the group for selecting the patch file */ private void buildPatchFileGroup(Composite parent) { - + Font font = parent.getFont(); fPatchFileGroup= new Group(parent, SWT.NONE); + fPatchFileGroup.setFont(font); fPatchFileGroup.setText(PatchMessages.getString("InputPatchPage.SelectPatch.title")); //$NON-NLS-1$ GridLayout layout= new GridLayout(); layout.numColumns= 3; @@ -260,6 +264,7 @@ // 1st row fUsePatchFileButton= new Button(fPatchFileGroup, SWT.RADIO); + fUsePatchFileButton.setFont(font); fUsePatchFileButton.setText(PatchMessages.getString("InputPatchPage.FileButton.text")); //$NON-NLS-1$ fPatchFileNameField= new Combo(fPatchFileGroup, SWT.BORDER); @@ -267,10 +272,12 @@ //gd.horizontalIndent= 8; gd.widthHint= SIZING_TEXT_FIELD_WIDTH; fPatchFileNameField.setLayoutData(gd); + fPatchFileNameField.setFont(font); fPatchFileBrowseButton= new Button(fPatchFileGroup, SWT.PUSH); fPatchFileBrowseButton.setText(PatchMessages.getString("InputPatchPage.ChooseFileButton.text")); //$NON-NLS-1$ fPatchFileBrowseButton.setLayoutData(new GridData()); + fPatchFileBrowseButton.setFont(font); // 2nd row fUseClipboardButton= new Button(fPatchFileGroup, SWT.RADIO); @@ -278,6 +285,7 @@ gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING); gd.horizontalSpan= 2; fUseClipboardButton.setLayoutData(gd); + fUseClipboardButton.setFont(font); // Add listeners @@ -329,6 +337,7 @@ GridData gd= new GridData(GridData.FILL_HORIZONTAL); gd.heightHint= 200; tree.setLayoutData(gd); + tree.setFont(parent.getFont()); fPatchTargets= new CheckboxTreeViewer(tree); fPatchTargets.setLabelProvider(new WorkbenchLabelProvider()); Index: compare/org/eclipse/compare/internal/patch/PreviewPatchPage.java =================================================================== RCS file: /home/eclipse/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PreviewPatchPage.java,v retrieving revision 1.8 diff -u -r1.8 PreviewPatchPage.java --- compare/org/eclipse/compare/internal/patch/PreviewPatchPage.java 31 May 2002 17:07:23 -0000 1.8 +++ compare/org/eclipse/compare/internal/patch/PreviewPatchPage.java 28 Nov 2002 23:49:04 -0000 @@ -9,6 +9,7 @@ import org.eclipse.swt.SWT; import org.eclipse.swt.events.*; +import org.eclipse.swt.graphics.Font; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; @@ -16,6 +17,7 @@ import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.jface.resource.JFaceResources; import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; @@ -145,11 +147,13 @@ } public void createControl(Composite parent) { - + Font font = parent.getFont(); + Composite composite= new Composite(parent, SWT.NULL); composite.setLayout(new GridLayout()); composite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL)); - + composite.setFont(font); + setControl(composite); buildPatchOptionsGroup(composite); @@ -167,11 +171,17 @@ gd.grabExcessHorizontalSpace= true; gd.grabExcessVerticalSpace= true; fTree.setLayoutData(gd); + fTree.setFont(font); // bottom pane showing hunks in compare viewer fHunkViewer= new CompareViewerSwitchingPane(splitter, SWT.BORDER | SWT.FLAT) { protected Viewer getViewer(Viewer oldViewer, Object input) { - return CompareUI.findContentViewer(oldViewer, (ICompareInput)input, this, fCompareConfiguration); + Viewer viewer = CompareUI.findContentViewer(oldViewer, (ICompareInput)input, this, fCompareConfiguration); + + if (viewer != null) + viewer.getControl().setFont(JFaceResources.getTextFont()); + + return viewer; } }; gd= new GridData(); @@ -180,6 +190,7 @@ gd.grabExcessHorizontalSpace= true; gd.grabExcessVerticalSpace= true; fHunkViewer.setLayoutData(gd); + fHunkViewer.setFont(font); // register listeners @@ -222,7 +233,10 @@ final Patcher patcher= fPatchWizard.getPatcher(); + Font font = parent.getFont(); + Group group= new Group(parent, SWT.NONE); + group.setFont(font); group.setText(PatchMessages.getString("PreviewPatchPage.PatchOptions.title")); //$NON-NLS-1$ GridLayout layout= new GridLayout(); layout.numColumns= 5; @@ -231,26 +245,32 @@ //fPatchFileGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); // 1st row - new Label(group, SWT.NONE).setText(PatchMessages.getString("PreviewPatchPage.IgnoreSegments.text")); //$NON-NLS-1$ - + Label ignoreSegments = new Label(group, SWT.NONE); + ignoreSegments.setText(PatchMessages.getString("PreviewPatchPage.IgnoreSegments.text")); //$NON-NLS-1$ + ignoreSegments.setFont(font); + fStripPrefixSegments= new Combo(group, SWT.DROP_DOWN | SWT.READ_ONLY | SWT.SIMPLE); int prefixCnt= patcher.getStripPrefixSegments(); String prefix= Integer.toString(prefixCnt); fStripPrefixSegments.add(prefix); + fStripPrefixSegments.setFont(font); fStripPrefixSegments.setText(prefix); addSpacer(group); fReversePatchButton= new Button(group, SWT.CHECK); + fReversePatchButton.setFont(font); fReversePatchButton.setText(PatchMessages.getString("PreviewPatchPage.ReversePatch.text")); //$NON-NLS-1$ addSpacer(group); // 2nd row Label l= new Label(group, SWT.NONE); + l.setFont(font); l.setText(PatchMessages.getString("PreviewPatchPage.FuzzFactor.text")); //$NON-NLS-1$ l.setToolTipText(PatchMessages.getString("PreviewPatchPage.FuzzFactor.tooltip")); //$NON-NLS-1$ fFuzzField= new Text(group, SWT.BORDER); + fFuzzField.setFont(font); fFuzzField.setText("2"); //$NON-NLS-1$ GridData gd2= new GridData(GridData.HORIZONTAL_ALIGN_CENTER); gd2.widthHint= 30; @@ -259,6 +279,7 @@ addSpacer(group); fIgnoreWhitespaceButton= new Button(group, SWT.CHECK); + fIgnoreWhitespaceButton.setFont(font); fIgnoreWhitespaceButton.setText(PatchMessages.getString("PreviewPatchPage.IgnoreWhitespace.text")); //$NON-NLS-1$ addSpacer(group);