Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Keppler2017-11-19 11:15:14 +0000
committerMatthias Sohn2017-11-20 13:49:28 +0000
commitb2401c8045004e2c87acf3d9b422de371cba4954 (patch)
tree653fe1369fbebf66a3774046f88fb8f7a22157a3
parent9d32236c6ab1ffeeb409b5d7fe5e48c931d468e8 (diff)
downloadegit-b2401c8045004e2c87acf3d9b422de371cba4954.tar.gz
egit-b2401c8045004e2c87acf3d9b422de371cba4954.tar.xz
egit-b2401c8045004e2c87acf3d9b422de371cba4954.zip
Make commit viewer diff list scrollable
If a commit contains a big number of files, then the commit viewer diff list cannot be scrolled down to see more than the very first files. This seems to be caused by the section widget, which automatically sizes the file list to contain every item. By providing a size hint, the section no longer expands to contain all items, but only consumes the available space of the editor. Bug: 527451 Change-Id: Ie6afee43842afd0b52585945ace2924837115f2a Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/CommitEditorPage.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/CommitEditorPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/CommitEditorPage.java
index d5984ffc17..a591ccf6cd 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/CommitEditorPage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/CommitEditorPage.java
@@ -504,7 +504,8 @@ public class CommitEditorPage extends FormPage
| toolkit.getBorderStyle());
Control control = diffViewer.getControl();
control.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TREE_BORDER);
- GridDataFactory.fillDefaults().grab(true, true).applyTo(control);
+ GridDataFactory.fillDefaults().hint(SWT.DEFAULT, 50).minSize(1, 50)
+ .grab(true, true).applyTo(control);
addToFocusTracking(control);
diffViewer.setContentProvider(ArrayContentProvider.getInstance());
diffViewer.setTreeWalk(getCommit().getRepository(), null);

Back to the top