Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2005-07-14 16:49:03 +0000
committermkersten2005-07-14 16:49:03 +0000
commite53a5e90b86d7ce2cafab95f01a065ccd4bd10eb (patch)
treefe6fdcbea817d9a3edb3b6608df671dfd8291d2e
parent52a8b3528d5c42a71ac93c3692a07bc9716ca944 (diff)
downloadorg.eclipse.mylyn.tasks-e53a5e90b86d7ce2cafab95f01a065ccd4bd10eb.tar.gz
org.eclipse.mylyn.tasks-e53a5e90b86d7ce2cafab95f01a065ccd4bd10eb.tar.xz
org.eclipse.mylyn.tasks-e53a5e90b86d7ce2cafab95f01a065ccd4bd10eb.zip
Bugzilla Bug 103749
Inconsistent font usage in Mylar Task List
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/editor/AbstractBugEditor.java5
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ITaskListElement.java9
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/MylarTasksPlugin.java8
3 files changed, 8 insertions, 14 deletions
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/editor/AbstractBugEditor.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/editor/AbstractBugEditor.java
index f12d2d1a4..2bc8353f7 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/editor/AbstractBugEditor.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/editor/AbstractBugEditor.java
@@ -108,7 +108,8 @@ public abstract class AbstractBugEditor extends EditorPart implements Listener {
// TODO: don't use hard-coded font
public static final Font TEXT_FONT = JFaceResources.getDefaultFont();
- public static final Font COMMENT_FONT = new Font(null, "Courier New", 9, SWT.NORMAL);
+ public static final Font COMMENT_FONT = JFaceResources.getFontRegistry().get(JFaceResources.TEXT_FONT);
+// new Font(null, "Courier New", 9, SWT.NORMAL);
public static final Font HEADER_FONT = JFaceResources.getDefaultFont();
@@ -1145,7 +1146,7 @@ public abstract class AbstractBugEditor extends EditorPart implements Listener {
generalTitleText.setFont(TEXT_FONT);
if(this instanceof ExistingBugEditor){
generalTitleText.setUnderlined(true);
- generalTitleText.setForeground(new Color(Display.getCurrent(), 0, 0, 255));
+ generalTitleText.setForeground(JFaceColors.getHyperlinkText(Display.getCurrent()));
generalTitleText.addMouseListener(new MouseListener(){
public void mouseDoubleClick(MouseEvent e) {}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ITaskListElement.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ITaskListElement.java
index 973e07616..745e2975c 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ITaskListElement.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ITaskListElement.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.mylar.tasks;
-import org.eclipse.swt.SWT;
+import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.Image;
@@ -21,12 +21,11 @@ import org.eclipse.swt.widgets.Display;
*/
public interface ITaskListElement {
- // TODO: remove hard-coded fonts and colors
- public static final Font BOLD = new Font(null, "Tahoma", 8, SWT.BOLD);
- public static final Font ITALIC = new Font(null, "Tahoma", 8, SWT.ITALIC);
+ public static final Font BOLD = JFaceResources.getFontRegistry().getBold(JFaceResources.DEFAULT_FONT);
+ public static final Font ITALIC = JFaceResources.getFontRegistry().getItalic(JFaceResources.DEFAULT_FONT);
+
public Color GRAY_VERY_LIGHT = new Color(Display.getDefault(), 200, 200, 200); // TODO: use theme?
-
public abstract Image getIcon();
public abstract Image getStatusIcon();
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/MylarTasksPlugin.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/MylarTasksPlugin.java
index c63f5be38..f7130d6dc 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/MylarTasksPlugin.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/MylarTasksPlugin.java
@@ -21,10 +21,8 @@ import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.mylar.core.MylarPlugin;
import org.eclipse.mylar.tasks.internal.TaskListExternalizer;
import org.eclipse.mylar.tasks.ui.views.TaskListView;
-import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ShellEvent;
import org.eclipse.swt.events.ShellListener;
-import org.eclipse.swt.graphics.Font;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.internal.Workbench;
@@ -40,11 +38,7 @@ public class MylarTasksPlugin extends AbstractUIPlugin {
private static TaskListManager taskListManager;
private TaskListExternalizer externalizer;
private ITaskListActionContributor contributor; // TODO: use extension points
-
- // TODO: remove hard-coded fonts
- public static final Font BOLD = new Font(null, "Tahoma", 8, SWT.BOLD);
- public static final Font ITALIC = new Font(null, "Tahoma", 8, SWT.ITALIC);
-
+
public static final String REPORT_OPEN_EDITOR = "org.eclipse.mylar.tasks.report.open.editor";
public static final String REPORT_OPEN_INTERNAL = "org.eclipse.mylar.tasks.report.open.internal";
public static final String REPORT_OPEN_EXTERNAL = "org.eclipse.mylar.tasks.report.open.external";

Back to the top