Revert "Bug 426021: [StyledText] setAlwaysShowScrollBars(true) not implemented"
This reverts commit f37a5e25493f6c2d77b39affb5d8de583639fa5f (except for the Javadoc change, which was OK).
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
index 7b88b6e..4982ffe 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
@@ -9434,13 +9434,9 @@
ScrollBar horizontalBar = getHorizontalBar();
int oldHeight = clientAreaHeight;
int oldWidth = clientAreaWidth;
- if (verticalBar != null) {
- verticalBar.setVisible(alwaysShowScroll);
- if (alwaysShowScroll) verticalBar.setValues(0, 0, 0, 1, 1, 1);
- }
- if (horizontalBar != null) {
- horizontalBar.setVisible(alwaysShowScroll);
- if (alwaysShowScroll) horizontalBar.setValues(0, 0, 0, 1, 1, 1);
+ if (!alwaysShowScroll) {
+ if (verticalBar != null) verticalBar.setVisible(false);
+ if (horizontalBar != null) horizontalBar.setVisible(false);
}
if (verticalBar != null) {
setScrollBar(verticalBar, clientAreaHeight, renderer.getHeight(), topMargin + bottomMargin);