diff options
author | Andrey Loskutov | 2015-08-02 12:28:26 +0000 |
---|---|---|
committer | Andrey Loskutov | 2015-08-02 13:07:04 +0000 |
commit | f377a9ea63186f924c94461654039c06cdfdae40 (patch) | |
tree | 268a24e986b7a1dc1e6f9f87b4c9818b57874065 /org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java | |
parent | 197dd427a193cd07c829b9a0e35db091b0751b4d (diff) | |
download | egit-f377a9ea63186f924c94461654039c06cdfdae40.tar.gz egit-f377a9ea63186f924c94461654039c06cdfdae40.tar.xz egit-f377a9ea63186f924c94461654039c06cdfdae40.zip |
Using SWT.DEFAULT halves diff widget size computation again
For whatever reason, commentAndDiffComposite.computeSize() is faster if
both given size hints are SWT.DEFAULT.
Bug: 473013
Change-Id: I9e9dd6f17e8b2dc660d067abb65b470df8031f63
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
Diffstat (limited to 'org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java')
-rw-r--r-- | org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java index 23e428c288..9930a1ca83 100644 --- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java +++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java @@ -2028,17 +2028,8 @@ public class GitHistoryPage extends HistoryPage implements RefsChangedListener, start = System.currentTimeMillis(); } - int widthHint; - if (commentViewer.getTextWidget().getWordWrap()) { - widthHint = commentAndDiffScrolledComposite.getClientArea().width; - if (commentAndDiffScrolledComposite.getVerticalBar() != null - && !commentAndDiffScrolledComposite.getVerticalBar().isVisible()) - widthHint -= commentAndDiffScrolledComposite.getVerticalBar().getSize().x; - } else { - widthHint = SWT.DEFAULT; - } Point size = commentAndDiffComposite - .computeSize(widthHint, SWT.DEFAULT); + .computeSize(SWT.DEFAULT, SWT.DEFAULT); commentAndDiffScrolledComposite.setMinSize(size); resizing = false; |