Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2007-06-12 15:31:32 -0400
committermkersten2007-06-12 15:31:32 -0400
commit9634326d61778ba55c8e0ec24dec261aa7564c5b (patch)
tree55aa2cbbf174ecde351c74ac87b8cecd915e35f5
parente532440cd65118482ab2030c03725a52e7a6c3b4 (diff)
downloadorg.eclipse.mylyn.tasks-9634326d61778ba55c8e0ec24dec261aa7564c5b.tar.gz
org.eclipse.mylyn.tasks-9634326d61778ba55c8e0ec24dec261aa7564c5b.tar.xz
org.eclipse.mylyn.tasks-9634326d61778ba55c8e0ec24dec261aa7564c5b.zip
RESOLVED - bug 188429: fix image resource leak in composite Task List images
https://bugs.eclipse.org/bugs/show_bug.cgi?id=188429
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/WorkweekProgressBar.java17
1 files changed, 7 insertions, 10 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/WorkweekProgressBar.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/WorkweekProgressBar.java
index 55814c120..f460be0ad 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/WorkweekProgressBar.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/WorkweekProgressBar.java
@@ -8,6 +8,7 @@
package org.eclipse.mylyn.internal.tasks.ui.views;
+import org.eclipse.mylyn.internal.tasks.ui.TaskListColorsAndFonts;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ControlAdapter;
import org.eclipse.swt.events.ControlEvent;
@@ -22,6 +23,8 @@ import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Canvas;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.themes.IThemeManager;
/**
* Derived from JUnitProgressBar
@@ -58,17 +61,11 @@ public class WorkweekProgressBar extends Canvas {
paint(e);
}
});
- addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- completedColor.dispose();
- }
- });
- Display display = parent.getDisplay();
- completedColor = new Color(display, 95, 191, 124); //95);
-// themeManager.getCurrentTheme().getColorRegistry().get(
-// TaskListColorsAndFonts.THEME_COLOR_TASK_TODAY_COMPLETED);
+ IThemeManager themeManager = PlatformUI.getWorkbench().getThemeManager();
+ completedColor = themeManager.getCurrentTheme().getColorRegistry().get(
+ TaskListColorsAndFonts.THEME_COLOR_TASK_TODAY_COMPLETED);
}
-
+
public void setMaximum(int max) {
maxTickCount = max;
}

Back to the top