Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2005-10-28 19:17:19 -0400
committermkersten2005-10-28 19:17:19 -0400
commitb9cda1f69afd6cd47ebf1b223995ffeb29bb361d (patch)
tree6414e33168db53b823f04f193ae9b7c0fd1b79d6
parentefc90c140398facc11ac88ea2b7c28df01f9dac8 (diff)
downloadorg.eclipse.mylyn.tasks-b9cda1f69afd6cd47ebf1b223995ffeb29bb361d.tar.gz
org.eclipse.mylyn.tasks-b9cda1f69afd6cd47ebf1b223995ffeb29bb361d.tar.xz
org.eclipse.mylyn.tasks-b9cda1f69afd6cd47ebf1b223995ffeb29bb361d.zip
icon overlay improvements
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/BugzillaImages.java14
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/Task.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/TaskListImages.java24
3 files changed, 24 insertions, 18 deletions
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/BugzillaImages.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/BugzillaImages.java
index b9af84f5a..87bbc0d8b 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/BugzillaImages.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/BugzillaImages.java
@@ -72,11 +72,11 @@ public class BugzillaImages {
public static final ImageDescriptor OVERLAY_OUTGOING = create(T_ELCL, "overlay-outgoing.gif");
public static final ImageDescriptor OVERLAY_CONFLICT = create(T_ELCL, "overlay-conflicting.gif");
- public static final ImageDescriptor TASK_BUGZILLA = createWithOverlay(TASK_BUG, null, true);
- public static final ImageDescriptor TASK_BUGZILLA_INCOMMING = createWithOverlay(TASK_BUGZILLA, OVERLAY_INCOMMING, true);
- public static final ImageDescriptor TASK_BUGZILLA_CONFLICT = createWithOverlay(TASK_BUGZILLA, OVERLAY_CONFLICT, true);
- public static final ImageDescriptor TASK_BUGZILLA_OUTGOING = createWithOverlay(TASK_BUGZILLA, OVERLAY_OUTGOING, true);
- public static final ImageDescriptor BUGZILLA_HIT = createWithOverlay(BUG_HIT, null, true);
+ public static final ImageDescriptor TASK_BUGZILLA = createWithOverlay(TASK_BUG, null, true, false);
+ public static final ImageDescriptor TASK_BUGZILLA_INCOMMING = createWithOverlay(TASK_BUGZILLA, OVERLAY_INCOMMING, true, false);
+ public static final ImageDescriptor TASK_BUGZILLA_CONFLICT = createWithOverlay(TASK_BUGZILLA, OVERLAY_CONFLICT, true, false);
+ public static final ImageDescriptor TASK_BUGZILLA_OUTGOING = createWithOverlay(TASK_BUGZILLA, OVERLAY_OUTGOING, true, false);
+ public static final ImageDescriptor BUGZILLA_HIT = createWithOverlay(BUG_HIT, null, true, false);
public static final ImageDescriptor BUGZILLA_HIT_INCOMMING = BUGZILLA_HIT;//createWithOverlay(BUGZILLA_HIT, OVERLAY_INCOMMING);
public static final ImageDescriptor TASK_BUGZILLA_NEW = create(T_TOOL, "task-bug-new.gif");
@@ -97,8 +97,8 @@ public class BugzillaImages {
}
}
- private static ImageDescriptor createWithOverlay(ImageDescriptor base, ImageDescriptor overlay, boolean top) {
- return new MylarTasklistOverlayDescriptor(base, overlay, top);
+ private static ImageDescriptor createWithOverlay(ImageDescriptor base, ImageDescriptor overlay, boolean top, boolean left) {
+ return new MylarTasklistOverlayDescriptor(base, overlay, top, left);
}
private static URL makeIconFileURL(String prefix, String name) throws MalformedURLException {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/Task.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/Task.java
index 6f4fdcacb..b11f619ff 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/Task.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/Task.java
@@ -26,6 +26,7 @@ import org.eclipse.mylar.tasklist.ui.views.TaskListView;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException;
@@ -37,6 +38,7 @@ import org.eclipse.ui.internal.Workbench;
public class Task implements ITask {
public static final long INACTIVITY_TIME_MILLIS = MylarPlugin.getContextManager().getActivityTimeoutSeconds() * 1000;
+ public Color ACTIVE = new Color(Display.getDefault(), 30, 30, 60);
private static final long serialVersionUID = 3545518391537382197L;
private boolean active = false;
@@ -411,6 +413,8 @@ public class Task implements ITask {
public Color getForeground() {
if (isCompleted()){
return GRAY_VERY_LIGHT;
+ } else if (isActive()) {
+ return ACTIVE;
} else {
return null;
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/TaskListImages.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/TaskListImages.java
index a666d73ba..90e2770bc 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/TaskListImages.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/TaskListImages.java
@@ -50,10 +50,10 @@ public class TaskListImages {
public static final ImageDescriptor COLOR_PALETTE = create(T_ELCL, "color-palette.gif");
public static final ImageDescriptor TASK2 = create(T_TOOL, "task.gif");
- public static final ImageDescriptor TASK = createWithOverlay(TASK2, null, true);
+ public static final ImageDescriptor TASK = createWithOverlay(TASK2, null, true, false);
public static final ImageDescriptor WEB_OVERLAY = create(T_TOOL, "overlay-web.gif");
- public static final ImageDescriptor TASK_WEB = createWithOverlay(TASK2, WEB_OVERLAY, false);
+ public static final ImageDescriptor TASK_WEB = createWithOverlay(TASK2, WEB_OVERLAY, false, true);
public static final ImageDescriptor TASK_NEW = create(T_TOOL, "task-new.gif");
public static final ImageDescriptor CATEGORY = create(T_TOOL, "category.gif");
@@ -83,8 +83,8 @@ public class TaskListImages {
}
}
- private static ImageDescriptor createWithOverlay(ImageDescriptor base, ImageDescriptor overlay, boolean top) {
- return new MylarTasklistOverlayDescriptor(base, overlay, top);
+ private static ImageDescriptor createWithOverlay(ImageDescriptor base, ImageDescriptor overlay, boolean top, boolean left) {
+ return new MylarTasklistOverlayDescriptor(base, overlay, top, left);
}
private static URL makeIconFileURL(String prefix, String name) throws MalformedURLException {
@@ -126,10 +126,12 @@ public class TaskListImages {
private ImageData overlay;
private Point fSize;
private boolean top;
+ private boolean left;
- public MylarTasklistOverlayDescriptor(ImageDescriptor baseDesc, ImageDescriptor overlayDesc, boolean top) {
+ public MylarTasklistOverlayDescriptor(ImageDescriptor baseDesc, ImageDescriptor overlayDesc, boolean top, boolean left) {
this.base = getImageData(baseDesc);
this.top = top;
+ this.left = left;
if(overlayDesc != null) this.overlay = getImageData(overlayDesc);
Point size = new Point(base.width, base.height);
setImageSize(size);
@@ -138,12 +140,12 @@ public class TaskListImages {
@Override
protected void drawCompositeImage(int width, int height) {
drawImage(base, 0, 0);
- if(overlay != null) {
- if (top) {
- drawImage(overlay, base.width - overlay.width, 0);
- } else {
- drawImage(overlay, base.width - overlay.width, base.height - overlay.height);
- }
+ int x = 0;
+ int y = 0;
+ if (!left) x = 8;//base.width - overlay.width;
+ if (!top) y = 8;//base.height - overlay.height;
+ if (overlay != null) {
+ drawImage(overlay, x, y);
}
}

Back to the top