diff options
author | spingel | 2011-04-02 01:44:17 +0000 |
---|---|---|
committer | spingel | 2011-04-02 01:44:17 +0000 |
commit | d08a37ec0fd4c9de90b08101eba20f4b062481a8 (patch) | |
tree | 4846d548a7a8bdf3f50160570357c179dc7801a9 /org.eclipse.mylyn.tasks.ui | |
parent | dc5fdbd882c99776d77a75ddb88d9270a243c515 (diff) | |
download | org.eclipse.mylyn.tasks-d08a37ec0fd4c9de90b08101eba20f4b062481a8.tar.gz org.eclipse.mylyn.tasks-d08a37ec0fd4c9de90b08101eba20f4b062481a8.tar.xz org.eclipse.mylyn.tasks-d08a37ec0fd4c9de90b08101eba20f4b062481a8.zip |
REOPENED - bug 340807: [backport] custom drop down field is too wide
https://bugs.eclipse.org/bugs/show_bug.cgi?id=340807
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui')
-rw-r--r-- | org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorAttributePart.java | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorAttributePart.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorAttributePart.java index 2af23138a..2794a6ace 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorAttributePart.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorAttributePart.java @@ -117,21 +117,24 @@ public class TaskEditorAttributePart extends AbstractTaskEditorSection { attributeEditor.createControl(attributesComposite, toolkit); LayoutHint layoutHint = attributeEditor.getLayoutHint(); GridData gd = new GridData(SWT.FILL, SWT.CENTER, false, false); - if (layoutHint != null - && !(layoutHint.rowSpan == RowSpan.SINGLE && layoutHint.columnSpan == ColumnSpan.SINGLE)) { - if (layoutHint.rowSpan == RowSpan.MULTIPLE) { + RowSpan rowSpan = (layoutHint != null && layoutHint.rowSpan != null) ? layoutHint.rowSpan : RowSpan.SINGLE; + ColumnSpan columnSpan = (layoutHint != null && layoutHint.columnSpan != null) + ? layoutHint.columnSpan + : ColumnSpan.SINGLE; + if (rowSpan == RowSpan.SINGLE && columnSpan == ColumnSpan.SINGLE) { + gd.widthHint = COLUMN_WIDTH; + gd.horizontalSpan = 1; + } else { + if (rowSpan == RowSpan.MULTIPLE) { gd.heightHint = MULTI_ROW_HEIGHT; } - if (layoutHint.columnSpan == ColumnSpan.SINGLE) { + if (columnSpan == ColumnSpan.SINGLE) { gd.widthHint = COLUMN_WIDTH; gd.horizontalSpan = 1; } else { gd.widthHint = MULTI_COLUMN_WIDTH; gd.horizontalSpan = columnCount - currentColumn + 1; } - } else { - gd.widthHint = COLUMN_WIDTH; - gd.horizontalSpan = 1; } attributeEditor.getControl().setLayoutData(gd); |