Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfbecker2010-05-27 21:10:44 +0000
committerfbecker2010-05-27 21:10:44 +0000
commitcafa4062aac4d3b4b71869c9eee4c6ac7693e1c4 (patch)
tree18c6a779878774be32b13c2576639a42436bcb9b /org.eclipse.mylyn.bugzilla.ui
parent87d6a69d7ae6bae860f3433805444ed4a6f034a0 (diff)
downloadorg.eclipse.mylyn.tasks-cafa4062aac4d3b4b71869c9eee4c6ac7693e1c4.tar.gz
org.eclipse.mylyn.tasks-cafa4062aac4d3b4b71869c9eee4c6ac7693e1c4.tar.xz
org.eclipse.mylyn.tasks-cafa4062aac4d3b4b71869c9eee4c6ac7693e1c4.zip
ASSIGNED - bug 313712: attachment dialog does not resize when Advanced section is expanded
https://bugs.eclipse.org/bugs/show_bug.cgi?id=313712
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.ui')
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskAttachmentPage.java28
1 files changed, 20 insertions, 8 deletions
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskAttachmentPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskAttachmentPage.java
index 45493b44e..6a74f6ff7 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskAttachmentPage.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskAttachmentPage.java
@@ -38,6 +38,7 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.forms.events.ExpansionAdapter;
import org.eclipse.ui.forms.events.ExpansionEvent;
@@ -67,7 +68,16 @@ public class BugzillaTaskAttachmentPage extends TaskAttachmentPage {
}
private void updateScrolledCompositeSize() {
- scrolledComposite.setMinSize(scrolledBodyComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT, true));
+ Point p = scrolledBodyComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
+ scrolledComposite.setMinSize(p);
+ Shell shell = getShell();
+ shell.pack();
+ Point shellSize = shell.getSize();
+ shellSize.x++;
+ shell.setSize(shellSize);
+ shellSize.x--;
+ shell.setSize(shellSize);
+ shell.pack();
}
private void createScrolledComposite(Composite parent) {
@@ -101,10 +111,14 @@ public class BugzillaTaskAttachmentPage extends TaskAttachmentPage {
.getRepositoryUrl());
if (configuration != null) {
List<BugzillaFlag> flags = configuration.getFlags();
- TaskAttribute productAttribute = getModel().getAttribute().getTaskData().getRoot().getMappedAttribute(
- BugzillaAttribute.PRODUCT.getKey());
- TaskAttribute componentAttribute = getModel().getAttribute().getTaskData().getRoot().getMappedAttribute(
- BugzillaAttribute.COMPONENT.getKey());
+ TaskAttribute productAttribute = getModel().getAttribute()
+ .getTaskData()
+ .getRoot()
+ .getMappedAttribute(BugzillaAttribute.PRODUCT.getKey());
+ TaskAttribute componentAttribute = getModel().getAttribute()
+ .getTaskData()
+ .getRoot()
+ .getMappedAttribute(BugzillaAttribute.COMPONENT.getKey());
Control[] children = getScrolledBodyComposite().getChildren();
Composite pageComposite = (Composite) children[children.length - 1];
Composite flagComposite = null;
@@ -185,8 +199,6 @@ public class BugzillaTaskAttachmentPage extends TaskAttachmentPage {
});
}
}
- Label dummy = new Label(pageComposite, SWT.NONE);
- dummy.setText(""); //$NON-NLS-1$
}
updateScrolledCompositeSize();
}
@@ -198,7 +210,7 @@ public class BugzillaTaskAttachmentPage extends TaskAttachmentPage {
flagExpandComposite.setBackground(container.getBackground());
flagExpandComposite.setText(Messages.BugzillaTaskAttachmentPage_Advanced);
flagExpandComposite.setLayout(new GridLayout(3, false));
- GridData g = new GridData(GridData.FILL_HORIZONTAL);
+ GridData g = new GridData(SWT.FILL, SWT.TOP, true, false);
g.horizontalSpan = 3;
flagExpandComposite.setLayoutData(g);
flagExpandComposite.addExpansionListener(new ExpansionAdapter() {

Back to the top