From 543c0b95ebd9f11ca7c4352f97438ea1b2febcf5 Mon Sep 17 00:00:00 2001 From: Uwe Stieber Date: Tue, 28 Jan 2014 13:29:22 +0100 Subject: [PATCH] Terminal: Fix Bug 425757 - Command line is disarranged This commit rolls back the commit faa118886693ef2c44122fccbff137ba4670ed18 which changed the layout to use a FillLayout. As this is fixing an issue with a horizontal scrollbar painted on Linux where it is not needed, it leads to more serious issues on Windows. Rolling back the commit is addressing the immediate need of getting the layout fixed where the scrollbar issue is somewhat cosmetical. --- features/org.eclipse.tm.terminal-feature/feature.xml | 2 +- features/org.eclipse.tm.terminal-feature/pom.xml | 2 +- .../org.eclipse.tm.terminal.core.sdk-feature/feature.xml | 2 +- features/org.eclipse.tm.terminal.sdk-feature/feature.xml | 2 +- plugins/org.eclipse.tm.terminal/META-INF/MANIFEST.MF | 2 +- plugins/org.eclipse.tm.terminal/pom.xml | 2 +- .../internal/terminal/emulator/VT100TerminalControl.java | 7 +++++-- 7 files changed, 11 insertions(+), 8 deletions(-) diff --git a/features/org.eclipse.tm.terminal-feature/feature.xml b/features/org.eclipse.tm.terminal-feature/feature.xml index cf8b73c89bb..bab0c638cd8 100644 --- a/features/org.eclipse.tm.terminal-feature/feature.xml +++ b/features/org.eclipse.tm.terminal-feature/feature.xml @@ -13,7 +13,7 @@ diff --git a/features/org.eclipse.tm.terminal-feature/pom.xml b/features/org.eclipse.tm.terminal-feature/pom.xml index 710a13aef81..6ae706e04d8 100644 --- a/features/org.eclipse.tm.terminal-feature/pom.xml +++ b/features/org.eclipse.tm.terminal-feature/pom.xml @@ -10,6 +10,6 @@ org.eclipse.tm.features org.eclipse.tm.terminal - 3.2.100.qualifier + 3.2.200.qualifier eclipse-feature diff --git a/features/org.eclipse.tm.terminal.core.sdk-feature/feature.xml b/features/org.eclipse.tm.terminal.core.sdk-feature/feature.xml index 9a0f1c8baa1..f547d4c64e2 100644 --- a/features/org.eclipse.tm.terminal.core.sdk-feature/feature.xml +++ b/features/org.eclipse.tm.terminal.core.sdk-feature/feature.xml @@ -12,7 +12,7 @@ diff --git a/features/org.eclipse.tm.terminal.sdk-feature/feature.xml b/features/org.eclipse.tm.terminal.sdk-feature/feature.xml index 64bab63ad6e..2ef3421dc0a 100644 --- a/features/org.eclipse.tm.terminal.sdk-feature/feature.xml +++ b/features/org.eclipse.tm.terminal.sdk-feature/feature.xml @@ -13,7 +13,7 @@ diff --git a/plugins/org.eclipse.tm.terminal/META-INF/MANIFEST.MF b/plugins/org.eclipse.tm.terminal/META-INF/MANIFEST.MF index a8eea040a49..f521127708c 100644 --- a/plugins/org.eclipse.tm.terminal/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.tm.terminal/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.tm.terminal; singleton:=true -Bundle-Version: 3.2.100.qualifier +Bundle-Version: 3.2.200.qualifier Bundle-Activator: org.eclipse.tm.internal.terminal.control.impl.TerminalPlugin Bundle-Vendor: %providerName Bundle-Localization: plugin diff --git a/plugins/org.eclipse.tm.terminal/pom.xml b/plugins/org.eclipse.tm.terminal/pom.xml index 01da4ae3069..6c2964316db 100644 --- a/plugins/org.eclipse.tm.terminal/pom.xml +++ b/plugins/org.eclipse.tm.terminal/pom.xml @@ -10,6 +10,6 @@ org.eclipse.tm org.eclipse.tm.terminal - 3.2.100.qualifier + 3.2.200.qualifier eclipse-plugin diff --git a/plugins/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100TerminalControl.java b/plugins/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100TerminalControl.java index f521c300fec..c3ea7015d7a 100644 --- a/plugins/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100TerminalControl.java +++ b/plugins/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100TerminalControl.java @@ -65,7 +65,8 @@ import org.eclipse.swt.events.KeyListener; import org.eclipse.swt.events.MouseAdapter; import org.eclipse.swt.events.MouseEvent; import org.eclipse.swt.graphics.Font; -import org.eclipse.swt.layout.FillLayout; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; @@ -672,7 +673,8 @@ public class VT100TerminalControl implements ITerminalControlForText, ITerminalC // modifying the text in method TerminalVerifyKeyListener.verifyKey(). fWndParent=new Composite(parent,SWT.NONE); - FillLayout layout=new FillLayout(); + GridLayout layout=new GridLayout(); + layout.marginWidth=0; layout.marginHeight=0; layout.verticalSpacing=0; fWndParent.setLayout(layout); ITerminalTextDataSnapshot snapshot=fTerminalModel.makeSnapshot(); @@ -681,6 +683,7 @@ public class VT100TerminalControl implements ITerminalControlForText, ITerminalC ITextCanvasModel canvasModel=new PollingTextCanvasModel(snapshot); fCtlText=new TextCanvas(fWndParent,canvasModel,SWT.NONE,new TextLineRenderer(fCtlText,canvasModel)); + fCtlText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); fCtlText.addResizeHandler(new TextCanvas.ResizeListener() { public void sizeChanged(int lines, int columns) { fTerminalText.setDimensions(lines, columns);