Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2007-06-12 00:15:44 -0400
committermkersten2007-06-12 00:15:44 -0400
commita3a3b858fcbd4728486d9603690202fee9cddd84 (patch)
tree74ab8c0ef261a8209e36aaccd62e5ff9ece2468d
parent5b03021160c40962b52f7f57046c4ebab3a324ba (diff)
downloadorg.eclipse.mylyn.tasks-a3a3b858fcbd4728486d9603690202fee9cddd84.tar.gz
org.eclipse.mylyn.tasks-a3a3b858fcbd4728486d9603690202fee9cddd84.tar.xz
org.eclipse.mylyn.tasks-a3a3b858fcbd4728486d9603690202fee9cddd84.zip
RESOLVED - bug 191890: TaskList bug with GTK Colorscheme
https://bugs.eclipse.org/bugs/show_bug.cgi?id=191890
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java19
1 files changed, 15 insertions, 4 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
index 3706968b4..f015ef30a 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
@@ -579,13 +579,24 @@ public class TaskListView extends ViewPart implements IPropertyChangeListener {
int green = Math.min(255, (int) (parentBackground.getGreen() * GRADIENT_TOP));
int blue = Math.min(255, (int) (parentBackground.getBlue() * GRADIENT_TOP));
- categoryGradientStart = new Color(Display.getDefault(), red, green, blue);
-
+ try {
+ categoryGradientStart = new Color(Display.getDefault(), red, green, blue);
+ } catch (Exception e) {
+ categoryGradientStart = getViewer().getTree().getParent().getBackground();
+ MylarStatusHandler.fail(e, "Could not set color: " + red + ", " + green + ", " + blue, false);
+ }
red = Math.max(0, (int) (parentBackground.getRed() / GRADIENT_BOTTOM));
green = Math.max(0, (int) (parentBackground.getGreen() / GRADIENT_BOTTOM));
blue = Math.max(0, (int) (parentBackground.getBlue() / GRADIENT_BOTTOM));
- categoryGradientEnd = new Color(Display.getDefault(), red, green, blue);
-
+ if (red > 255) {
+ red = 255;
+ }
+ try {
+ categoryGradientEnd = new Color(Display.getDefault(), red, green, blue);
+ } catch (Exception e) {
+ categoryGradientStart = getViewer().getTree().getParent().getBackground();
+ MylarStatusHandler.fail(e, "Could not set color: " + red + ", " + green + ", " + blue, false);
+ }
gradientListenerAdded = true;
} else if (categoryGradientStart != null && categoryGradientStart.equals(categoryGradientEnd)) {
getViewer().getTree().removeListener(SWT.EraseItem, CATEGORY_GRADIENT_DRAWER);

Back to the top