Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2015-03-05 12:13:16 -0500
committerUwe Stieber2015-03-05 12:13:16 -0500
commit65a8e283e265383bc0704640c0c066aef240f242 (patch)
treef6e0548508d3f82a18fa21489b6cd1dfc0ed0ac5
parentea1ae40a91db235046ac85651f5d71ab7c07d90e (diff)
downloadorg.eclipse.tcf-65a8e283e265383bc0704640c0c066aef240f242.tar.gz
org.eclipse.tcf-65a8e283e265383bc0704640c0c066aef240f242.tar.xz
org.eclipse.tcf-65a8e283e265383bc0704640c0c066aef240f242.zip
Target Explorer: Cleanup calculation of button label width hint1.3_WR_20150313_4.0.5tcf-1.3_WR_20150313_4.0.5_bugfix
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseEditBrowseTextControl.java10
1 files changed, 2 insertions, 8 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseEditBrowseTextControl.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseEditBrowseTextControl.java
index b2ce60d0a..e4746e622 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseEditBrowseTextControl.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseEditBrowseTextControl.java
@@ -1187,17 +1187,11 @@ public class BaseEditBrowseTextControl extends AbstractDecoratedDialogPageContro
FormToolkit toolkit = getFormToolkit();
Button button = toolkit != null ? toolkit.createButton(parent, null, SWT.PUSH) : new Button(parent, SWT.PUSH);
- // add a whitespace at the beginning and at the end of the button text to make the
- // button visibly broader than the label itself.
- button.setText(formatButtonLabel(getButtonLabel()));
+ button.setText(getButtonLabel());
return button;
}
- protected String formatButtonLabel(String label) {
- return " " + (label != null ? label.trim() : Messages.BaseEditBrowseTextControl_button_label) + " "; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
/**
* Configure the given button control before the control is set visible. Subclasses may use
* this hook to configure the button control for their specific needs and to register any
@@ -1221,7 +1215,7 @@ public class BaseEditBrowseTextControl extends AbstractDecoratedDialogPageContro
// If not yet set, assure that the buttons fill in the available space
if (button.getLayoutData() == null) {
GridData layoutData = new GridData(SWT.FILL, SWT.CENTER, false, false);
- layoutData.widthHint = SWTControlUtil.convertWidthInCharsToPixels(button, formatButtonLabel(getButtonLabel()).length());
+ layoutData.widthHint = SWTControlUtil.convertWidthInCharsToPixels(button, getButtonLabel().length() + 2);
button.setLayoutData(layoutData);
}
}

Back to the top