Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2011-05-30 21:56:48 +0000
committerspingel2011-05-30 21:56:48 +0000
commit0bfb05edd3b1a2425eb397fe6be605462046fa42 (patch)
tree9c5474bd436cdd05ccd43a29e755f217992258b7 /org.eclipse.mylyn.tasks.ui
parent1ff7e0bd7ef8653133985473b4eef38a7ae3bbee (diff)
downloadorg.eclipse.mylyn.tasks-0bfb05edd3b1a2425eb397fe6be605462046fa42.tar.gz
org.eclipse.mylyn.tasks-0bfb05edd3b1a2425eb397fe6be605462046fa42.tar.xz
org.eclipse.mylyn.tasks-0bfb05edd3b1a2425eb397fe6be605462046fa42.zip
ASSIGNED - bug 345847: [patch][api] create UI for private comments and attachments
https://bugs.eclipse.org/bugs/show_bug.cgi?id=345847
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui')
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart.java21
1 files changed, 11 insertions, 10 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart.java
index 3e2479600..ba7908785 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart.java
@@ -54,7 +54,6 @@ import org.eclipse.swt.layout.RowLayout;
import org.eclipse.swt.widgets.Canvas;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.ui.actions.ActionContext;
import org.eclipse.ui.forms.IFormColors;
@@ -423,17 +422,19 @@ public class TaskEditorCommentPart extends AbstractTaskEditorPart {
// String value = commentID.getValue();
// sb.append(" (ID " + value + ")");
// }
- if (taskComment.getIsPrivate() != null) {
- if (taskComment.getIsPrivate()) {
- if (privateFont == null) {
- Font a = formHyperlink.getFont();
- FontData[] fd = a.getFontData();
- fd[0].setStyle(SWT.ITALIC | SWT.BOLD);
- privateFont = new Font(Display.getCurrent(), fd[0]);
+ if (taskComment.getIsPrivate() != null && taskComment.getIsPrivate()) {
+ if (privateFont == null) {
+ Font a = formHyperlink.getFont();
+ FontData[] fd = a.getFontData();
+ for (FontData fontData : fd) {
+ fontData.setStyle(SWT.ITALIC | SWT.BOLD);
}
- formHyperlink.setFont(privateFont);
- toolTipText = NLS.bind(Messages.TaskEditorCommentPart_Privat_Comment_ToolTip_Text, toolTipText);
+ privateFont = new Font(formHyperlink.getDisplay(), fd);
}
+ formHyperlink.setFont(privateFont);
+ toolTipText = NLS.bind(Messages.TaskEditorCommentPart_Privat_Comment_ToolTip_Text, toolTipText);
+ } else {
+ formHyperlink.setFont(commentComposite.getFont());
}
formHyperlink.setToolTipText(toolTipText);

Back to the top