aboutsummaryrefslogtreecommitdiffstats
path: root/ddms/app
diff options
context:
space:
mode:
authorSiva Velusamy <vsiva@google.com>2011-08-23 10:21:11 -0700
committerSiva Velusamy <vsiva@google.com>2011-08-23 10:26:11 -0700
commit44e49e03435b2d35f21510c8c70605a9c341fac2 (patch)
tree31e6d8507d646247b04e416354731daf324b7b83 /ddms/app
parentae4bb7363bbdaa613d5fea1d35d020a2b5e7b8e1 (diff)
downloadsdk-44e49e03435b2d35f21510c8c70605a9c341fac2.zip
sdk-44e49e03435b2d35f21510c8c70605a9c341fac2.tar.gz
sdk-44e49e03435b2d35f21510c8c70605a9c341fac2.tar.bz2
Use SWT Label's instead of Link's for proper wrap behavior.
On Mac, Link widgets to not enforce SWT.WRAP style. As a result, text is just clipped instead of being wrapped. Split the privacy policy text into two separate components - one with the text, and one with the link, and use Label's for the longer text content. Change-Id: Ic667b9ec62c0ce26c43611b97e0bbdc89dbc68d6
Diffstat (limited to 'ddms/app')
-rw-r--r--ddms/app/src/com/android/ddms/PrefsDialog.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/ddms/app/src/com/android/ddms/PrefsDialog.java b/ddms/app/src/com/android/ddms/PrefsDialog.java
index 9b79886..42ab76c 100644
--- a/ddms/app/src/com/android/ddms/PrefsDialog.java
+++ b/ddms/app/src/com/android/ddms/PrefsDialog.java
@@ -50,6 +50,7 @@ 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.Label;
import org.eclipse.swt.widgets.Link;
import org.eclipse.swt.widgets.Shell;
@@ -528,11 +529,13 @@ public final class PrefsDialog {
mTop.setLayout(new GridLayout(1, false));
mTop.setLayoutData(new GridData(GridData.FILL_BOTH));
- Link text = new Link(mTop, SWT.WRAP);
+ Label text = new Label(mTop, SWT.WRAP);
text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
text.setText(SdkStatsPermissionDialog.BODY_TEXT);
- text.addSelectionListener(new SelectionAdapter() {
+ Link privacyPolicyLink = new Link(mTop, SWT.WRAP);
+ privacyPolicyLink.setText(SdkStatsPermissionDialog.PRIVACY_POLICY_LINK_TEXT);
+ privacyPolicyLink.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
SdkStatsPermissionDialog.openUrl(event.text);