Text font fixed in ScriptEditor
authorAlex Kirhenshtein <alk@netxms.org>
Sat, 23 Mar 2013 16:50:11 +0000 (16:50 +0000)
committerAlex Kirhenshtein <alk@netxms.org>
Sat, 23 Mar 2013 16:50:11 +0000 (16:50 +0000)
src/java/netxms-eclipse/NXSL/src/org/netxms/ui/eclipse/nxsl/widgets/ScriptEditor.java

index f5d7678..084528f 100644 (file)
@@ -22,6 +22,7 @@ import java.util.Collection;
 import java.util.HashSet;\r
 import java.util.Set;\r
 \r
+import org.eclipse.jface.resource.JFaceResources;\r
 import org.eclipse.jface.text.IFindReplaceTarget;\r
 import org.eclipse.jface.text.ITextOperationTarget;\r
 import org.eclipse.jface.text.TextViewerUndoManager;\r
@@ -63,7 +64,8 @@ public class ScriptEditor extends Composite
        {\r
                super(parent, style);\r
                \r
-               editorFont = new Font(getShell().getDisplay(), "Courier New", 10, SWT.NORMAL);\r
+               //editorFont = new Font(getShell().getDisplay(), "Courier New", 10, SWT.NORMAL);\r
+               editorFont = JFaceResources.getTextFont();\r
                \r
                proposalIcons[0] = Activator.getImageDescriptor("icons/function.gif").createImage();\r
                proposalIcons[1] = Activator.getImageDescriptor("icons/var_global.gif").createImage();\r
@@ -143,7 +145,7 @@ public class ScriptEditor extends Composite
        {\r
                for(int i = 0; i < proposalIcons.length; i++)\r
                        proposalIcons[i].dispose();\r
-               editorFont.dispose();\r
+               //editorFont.dispose();\r
                super.dispose();\r
        }\r
        \r