[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[Subclipse-dev] Commit dialog sash form

From: Jörg Eichhorn <joerg_at_finalize.de>
Date: 2006-01-21 21:06:22 CET

Hello,

imho the commit dialog lacks the possibility to resize commit message
area. Especially when the dialog window height is high (e.g. 800 px),
the commit message textbox is very large.
I think it would make sense to allow resizing this.

In the attached patch i've put the list of resources and the buttons
into the lower area and the rest to the top.

The attached patch was made using the 1.0.x branch.

Jörg

Index: src/org/tigris/subversion/subclipse/ui/comments/CommitCommentArea.java
===================================================================
--- src/org/tigris/subversion/subclipse/ui/comments/CommitCommentArea.java (revision 2056)
+++ src/org/tigris/subversion/subclipse/ui/comments/CommitCommentArea.java (working copy)
@@ -39,7 +39,7 @@
 public class CommitCommentArea extends DialogArea {
 
         private static final int WIDTH_HINT = 350;
- private static final int HEIGHT_HINT = 150;
+ private static final int HEIGHT_HINT = 50;
         
         private String enterCommentMessage;
         private String oldComment;
Index: src/org/tigris/subversion/subclipse/ui/dialogs/CommitDialog.java
===================================================================
--- src/org/tigris/subversion/subclipse/ui/dialogs/CommitDialog.java (revision 2056)
+++ src/org/tigris/subversion/subclipse/ui/dialogs/CommitDialog.java (working copy)
@@ -21,6 +21,7 @@
 import org.eclipse.jface.viewers.TableLayout;
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
 import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.events.SelectionAdapter;
@@ -112,12 +113,27 @@
                 Composite composite = new Composite(parent, SWT.NULL);
                 composite.setLayout(new GridLayout());
                 composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ SashForm sashForm = new SashForm(composite, SWT.VERTICAL);
+ sashForm.setLayout(new GridLayout());
+ sashForm.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ Composite cTop = new Composite(sashForm, SWT.NULL);
+ cTop.setLayout(new GridLayout());
+ cTop.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ Composite cBottom = new Composite(sashForm, SWT.NULL);
+ cBottom.setLayout(new GridLayout());
+ cBottom.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ sashForm.setWeights(new int[] {3, 4});
+
                 
                 if (projectProperties != null) {
- addBugtrackingArea(composite);
+ addBugtrackingArea(cTop);
                 }
 
- commitCommentArea.createArea(composite);
+ commitCommentArea.createArea(cTop);
                 commitCommentArea.addPropertyChangeListener(new IPropertyChangeListener() {
                         public void propertyChange(PropertyChangeEvent event) {
                                 if (event.getProperty() == CommitCommentArea.OK_REQUESTED)
@@ -125,7 +141,7 @@
                         }
                 });
 
- addResourcesArea(composite);
+ addResourcesArea(cBottom);
                                 
                 // set F1 help
                 WorkbenchHelp.setHelp(composite, IHelpContextIds.RELEASE_COMMENT_DIALOG);

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subclipse.tigris.org
For additional commands, e-mail: dev-help@subclipse.tigris.org
Received on Sat Jan 21 22:12:50 2006

This is an archived mail posted to the Subclipse Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.