Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2009-06-16 18:14:49 +0000
committermkersten2009-06-16 18:14:49 +0000
commit7565a4a576ee15e59168128d782ede995204bc14 (patch)
treea69031189b64bbf1600ef6bb3195d98590e24f44
parente7ea7948e857d8fc8fc858e962eb588485e06951 (diff)
downloadorg.eclipse.mylyn.tasks-7565a4a576ee15e59168128d782ede995204bc14.tar.gz
org.eclipse.mylyn.tasks-7565a4a576ee15e59168128d782ede995204bc14.tar.xz
org.eclipse.mylyn.tasks-7565a4a576ee15e59168128d782ede995204bc14.zip
RESOLVED - bug 280475: review and and polish new UI additions
https://bugs.eclipse.org/bugs/show_bug.cgi?id=280475
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/obj16/repository-small-top.gifbin0 -> 908 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/Messages.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorPlanningPart.java1
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/messages.properties1
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotificationPopup.java13
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListToolTip.java24
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiImages.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java9
8 files changed, 41 insertions, 11 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/icons/obj16/repository-small-top.gif b/org.eclipse.mylyn.tasks.ui/icons/obj16/repository-small-top.gif
new file mode 100644
index 000000000..43cb48f27
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.ui/icons/obj16/repository-small-top.gif
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/Messages.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/Messages.java
index 904182404..017cce093 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/Messages.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/Messages.java
@@ -167,6 +167,8 @@ public class Messages extends NLS {
public static String TaskEditorPlanningPart_Scheduled;
+ public static String TaskEditorPlanningPart_TaskEditorPlanningPart_tooltip;
+
public static String TaskEditorPlanningPart_Time_working_on_this_task;
public static String TaskEditorRichTextPart_Browser_Preview;
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorPlanningPart.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorPlanningPart.java
index 35b37b8b3..a45dbe0fc 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorPlanningPart.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorPlanningPart.java
@@ -46,6 +46,7 @@ public class TaskEditorPlanningPart extends AbstractTaskEditorPart {
@Override
public void createControl(Composite parent, FormToolkit toolkit) {
part.createControl(parent, toolkit);
+ part.getSection().setToolTipText(Messages.TaskEditorPlanningPart_TaskEditorPlanningPart_tooltip);
setSection(toolkit, part.getSection());
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/messages.properties b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/messages.properties
index e062d1869..2b6fc776a 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/messages.properties
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/messages.properties
@@ -85,6 +85,7 @@ TaskEditorPlanningPart_Due=Due:
TaskEditorPlanningPart_Estimated=Estimated:
TaskEditorPlanningPart_Reset=Reset
TaskEditorPlanningPart_Scheduled=Scheduled:
+TaskEditorPlanningPart_TaskEditorPlanningPart_tooltip=Contents are stored locally, not\n submitted to the repository.
TaskEditorPlanningPart_Time_working_on_this_task=Time working on this task
TaskEditorRichTextPart_Browser_Preview=Browser Preview
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotificationPopup.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotificationPopup.java
index 2a5b31646..2ec2545a6 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotificationPopup.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotificationPopup.java
@@ -24,12 +24,15 @@ import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.forms.IFormColors;
import org.eclipse.ui.forms.events.HyperlinkAdapter;
import org.eclipse.ui.forms.events.HyperlinkEvent;
@@ -63,6 +66,12 @@ public class TaskListNotificationPopup extends AbstractNotificationPopup {
}
@Override
+ protected Color getTitleForeground() {
+ return TasksUiPlugin.getDefault().getFormColors(Display.getDefault()).getColor(IFormColors.TITLE);
+
+ }
+
+ @Override
protected void createContentArea(Composite parent) {
int count = 0;
for (final AbstractNotification notification : notifications) {
@@ -120,7 +129,7 @@ public class TaskListNotificationPopup extends AbstractNotificationPopup {
if (notification.getDescription() != null) {
descriptionText = notification.getDescription();
}
- if (descriptionText != null && !descriptionText.trim().equals("")) { //$NON-NLS-1$
+ if (descriptionText != null && !descriptionText.trim().equals("")) {
Label descriptionLabel = new Label(notificationComposite, SWT.NO_FOCUS);
descriptionLabel.setText(descriptionText);
descriptionLabel.setBackground(parent.getBackground());
@@ -135,7 +144,7 @@ public class TaskListNotificationPopup extends AbstractNotificationPopup {
TaskHyperlink remainingHyperlink = new TaskHyperlink(notificationComposite, SWT.NO_FOCUS);
remainingHyperlink.setBackground(parent.getBackground());
- remainingHyperlink.setText(numNotificationsRemain + " " + NOTIFICATIONS_HIDDEN); //$NON-NLS-1$
+ remainingHyperlink.setText(numNotificationsRemain + " " + NOTIFICATIONS_HIDDEN);
GridDataFactory.fillDefaults().span(2, SWT.DEFAULT).applyTo(remainingHyperlink);
remainingHyperlink.addHyperlinkListener(new HyperlinkAdapter() {
@Override
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListToolTip.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListToolTip.java
index 4a7af8e5e..845c47399 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListToolTip.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListToolTip.java
@@ -20,6 +20,7 @@ import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.mylyn.commons.core.DateUtil;
+import org.eclipse.mylyn.internal.provisional.commons.ui.CommonFonts;
import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
import org.eclipse.mylyn.internal.provisional.commons.ui.GradientToolTip;
import org.eclipse.mylyn.internal.provisional.commons.ui.ScalingHyperlink;
@@ -53,6 +54,7 @@ import org.eclipse.mylyn.tasks.ui.TasksUi;
import org.eclipse.mylyn.tasks.ui.TasksUiImages;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
@@ -69,6 +71,7 @@ import org.eclipse.swt.widgets.ToolItem;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.swt.widgets.Widget;
+import org.eclipse.ui.forms.IFormColors;
import com.ibm.icu.text.DateFormat;
import com.ibm.icu.text.SimpleDateFormat;
@@ -99,11 +102,14 @@ public class TaskListToolTip extends GradientToolTip {
private final Control control;
+ private final Color titleColor;
+
public TaskListToolTip(Control control) {
super(control);
-
this.control = control;
setShift(new Point(1, 1));
+ control.getDisplay();
+ titleColor = TasksUiPlugin.getDefault().getFormColors(control.getDisplay()).getColor(IFormColors.TITLE);
}
public void dispose() {
@@ -161,6 +167,8 @@ public class TaskListToolTip extends GradientToolTip {
sb.append(getRepositoryLabel(query.getConnectorKind(), query.getRepositoryUrl()));
sb.append("]"); //$NON-NLS-1$
return sb.toString();
+ } else if (element instanceof ITask) {
+ return ((ITask) element).getSummary();
} else {
return new TaskElementLabelProvider(false).getText(element);
}
@@ -441,7 +449,7 @@ public class TaskListToolTip extends GradientToolTip {
Composite composite = createToolTipContentAreaComposite(parent);
- addIconAndLabel(composite, getImage(currentTipElement), getTitleText(currentTipElement));
+ addIconAndLabel(composite, getImage(currentTipElement), getTitleText(currentTipElement), true);
String detailsText = getDetailsText(currentTipElement);
if (detailsText != null) {
@@ -584,6 +592,10 @@ public class TaskListToolTip extends GradientToolTip {
}
protected void addIconAndLabel(Composite parent, Image image, String text) {
+ addIconAndLabel(parent, image, text, false);
+ }
+
+ protected void addIconAndLabel(Composite parent, Image image, String text, boolean title) {
Label imageLabel = new Label(parent, SWT.NONE);
imageLabel.setForeground(parent.getDisplay().getSystemColor(SWT.COLOR_INFO_FOREGROUND));
imageLabel.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
@@ -591,14 +603,18 @@ public class TaskListToolTip extends GradientToolTip {
imageLabel.setImage(image);
Label textLabel = new Label(parent, SWT.WRAP);
- textLabel.setForeground(parent.getDisplay().getSystemColor(SWT.COLOR_INFO_FOREGROUND));
+ if (title) {
+ textLabel.setFont(CommonFonts.BOLD);
+ textLabel.setForeground(titleColor);
+ } else {
+ textLabel.setForeground(parent.getDisplay().getSystemColor(SWT.COLOR_INFO_FOREGROUND));
+ }
textLabel.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
textLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_CENTER));
text = removeTrailingNewline(text);
textLabel.setText(TasksUiInternal.escapeLabelText(text));
int width = Math.min(textLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT).x, MAX_WIDTH);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.BEGINNING).hint(width, SWT.DEFAULT).applyTo(textLabel);
-
}
private static class ProgressData {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiImages.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiImages.java
index 0574d13a4..46bf2db3a 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiImages.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiImages.java
@@ -111,6 +111,8 @@ public class TasksUiImages {
public static final ImageDescriptor REPOSITORY_SMALL = create(OBJ, "repository-small.gif"); //$NON-NLS-1$
+ public static final ImageDescriptor REPOSITORY_SMALL_TOP = create(OBJ, "repository-small-top.gif"); //$NON-NLS-1$
+
public static final ImageDescriptor REPOSITORY_NEW = create("etool16", "repository-new.gif"); //$NON-NLS-1$ //$NON-NLS-2$
/**
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java
index 1a3ec681e..3940a8618 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java
@@ -45,7 +45,6 @@ import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.commons.ui.TaskListImageDescriptor;
import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
import org.eclipse.mylyn.internal.provisional.commons.ui.CommonTextSupport;
import org.eclipse.mylyn.internal.provisional.commons.ui.CommonUiUtil;
@@ -918,10 +917,10 @@ public class TaskEditor extends SharedHeaderFormEditor {
TasksUiUtil.openUrl(taskUrl);
}
};
- ImageDescriptor overlay = TasksUiPlugin.getDefault().getOverlayIcon(taskRepository.getConnectorKind());
- ImageDescriptor compositeDescriptor = new TaskListImageDescriptor(TasksUiImages.REPOSITORY_SMALL, overlay,
- false, true);
- openWithBrowserAction.setImageDescriptor(compositeDescriptor);
+// ImageDescriptor overlay = TasksUiPlugin.getDefault().getOverlayIcon(taskRepository.getConnectorKind());
+// ImageDescriptor compositeDescriptor = new TaskListImageDescriptor(TasksUiImages.REPOSITORY_SMALL_TOP,
+// overlay, false, true);
+ openWithBrowserAction.setImageDescriptor(CommonImages.WEB);
//openWithBrowserAction.setImageDescriptor(CommonImages.BROWSER_OPEN_TASK);
openWithBrowserAction.setToolTipText(Messages.AbstractTaskEditorPage_Open_with_Web_Browser);
toolBarManager.appendToGroup("open", openWithBrowserAction); //$NON-NLS-1$

Back to the top