Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Unified Diff: plugins/org.chromium.debug.ui/src/org/chromium/debug/ui/propertypages/AccuratenessControl.java

Issue 7398023: Redesign UI for accurateness property of file (Closed) Base URL: https://chromedevtools.googlecode.com/svn/trunk
Patch Set: Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: plugins/org.chromium.debug.ui/src/org/chromium/debug/ui/propertypages/AccuratenessControl.java
diff --git a/plugins/org.chromium.debug.ui/src/org/chromium/debug/ui/propertypages/AccuratenessControl.java b/plugins/org.chromium.debug.ui/src/org/chromium/debug/ui/propertypages/AccuratenessControl.java
index 0c8515e52e26d88e2a325717bea8fe38921cfcea..c9fb6e3b1010fc10d0c2233a060283e6cda8d72b 100644
--- a/plugins/org.chromium.debug.ui/src/org/chromium/debug/ui/propertypages/AccuratenessControl.java
+++ b/plugins/org.chromium.debug.ui/src/org/chromium/debug/ui/propertypages/AccuratenessControl.java
@@ -17,6 +17,7 @@ import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
/**
* UI control element that shows several last segments of the file path and allow to show more
@@ -30,25 +31,32 @@ class AccuratenessControl {
Composite inner;
{
inner = new Composite(composite, SWT.NONE);
- GridLayout topLayout = new GridLayout();
- topLayout.numColumns = 1;
- inner.setLayout(topLayout);
- inner.setLayoutData(new GridData(GridData.FILL_BOTH));
+ GridLayout layout = new GridLayout(1, false);
+ layout.marginHeight = 0;
+ inner.setLayout(layout);
+ inner.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
}
- final PathLabel pathLabel = new PathLabel(inner, pathSegments);
- pathLabel.getControl().setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ Composite topLineBlock;
+ {
+ topLineBlock = new Composite(inner, SWT.NONE);
+ GridLayout layout = new GridLayout(2, false);
+ layout.marginHeight = 0;
+ layout.marginWidth = 0;
+ topLineBlock.setLayout(layout);
+ topLineBlock.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ }
- pathLabel.setVisiblePart(initialAccuratenessValue);
+ Label label = new Label(topLineBlock, SWT.NONE);
+ label.setText("Use more or less file path components:");
final Button less;
final Button more;
{
- Composite buttonsGroup = new Composite(inner, SWT.NONE);
- GridLayout topLayout = new GridLayout();
- topLayout.numColumns = 2;
- buttonsGroup.setLayout(topLayout);
- buttonsGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
+ Composite buttonsGroup = new Composite(topLineBlock, SWT.NONE);
+ GridLayout layout = new GridLayout(2, false);
+ layout.marginHeight = 0;
+ buttonsGroup.setLayout(layout);
less = new Button(buttonsGroup, SWT.NONE);
less.setText(Messages.AccuratenessControl_LESS_BUTTON);
@@ -56,19 +64,23 @@ class AccuratenessControl {
more.setText(Messages.AccuratenessControl_MORE_BUTTON);
}
+
+ final PathLabel pathLabel = new PathLabel(inner, pathSegments);
+ pathLabel.getControl().setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ pathLabel.setVisiblePart(initialAccuratenessValue);
+
+ // Padding
+ new Label(inner, SWT.NONE);
+
Elements elements = new Elements() {
- @Override
- public AccuratenessControl.PathLabel getPathLabel() {
+ @Override public AccuratenessControl.PathLabel getPathLabel() {
return pathLabel;
}
-
- @Override
- public Button getMoreButton() {
+ @Override public Button getMoreButton() {
return more;
}
-
- @Override
- public Button getLessButton() {
+ @Override public Button getLessButton() {
return less;
}
};

Powered by Google App Engine
This is Rietveld 408576698