diff options
author | Michael Jurka <mikejurka@google.com> | 2011-09-27 12:21:27 -0700 |
---|---|---|
committer | Michael Jurka <mikejurka@google.com> | 2011-09-28 11:22:47 -0700 |
commit | e3f4b8fd2435e0af778230df455c905e23ec583e (patch) | |
tree | 363def63e26639c58b1112294b2def1c023d39d3 /src/com/android/gallery3d/photoeditor | |
parent | b160bf641958039fb43c66b945e237ef78318c0e (diff) | |
download | android_packages_apps_Snap-e3f4b8fd2435e0af778230df455c905e23ec583e.tar.gz android_packages_apps_Snap-e3f4b8fd2435e0af778230df455c905e23ec583e.tar.bz2 android_packages_apps_Snap-e3f4b8fd2435e0af778230df455c905e23ec583e.zip |
Change gallery crop interface to be consistent with widget resizing
- Always show the resize controls when you're not touching the UI
- Change the resize controls to the holo style
Change-Id: Ia32235d6d82196a24b26fc78b9e9e1e3fb1f5250
Diffstat (limited to 'src/com/android/gallery3d/photoeditor')
-rw-r--r-- | src/com/android/gallery3d/photoeditor/actions/CropView.java | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/src/com/android/gallery3d/photoeditor/actions/CropView.java b/src/com/android/gallery3d/photoeditor/actions/CropView.java index 75d74fcff..4a2ac5f10 100644 --- a/src/com/android/gallery3d/photoeditor/actions/CropView.java +++ b/src/com/android/gallery3d/photoeditor/actions/CropView.java @@ -53,8 +53,7 @@ class CropView extends FullscreenToolView { private static final float BORDER_WIDTH = 2.0f; private final Paint borderPaint; - private final Drawable heightIndicator; - private final Drawable widthIndicator; + private final Drawable cropIndicator; private final int indicatorSize; private final RectF cropBounds = new RectF(0, 0, 1, 1); @@ -67,8 +66,7 @@ class CropView extends FullscreenToolView { super(context, attrs); Resources resources = context.getResources(); - heightIndicator = resources.getDrawable(R.drawable.camera_crop_height_holo); - widthIndicator = resources.getDrawable(R.drawable.camera_crop_width_holo); + cropIndicator = resources.getDrawable(R.drawable.camera_crop_holo); indicatorSize = (int) resources.getDimension(R.dimen.crop_indicator_size); borderPaint = new Paint(); @@ -233,18 +231,18 @@ class CropView extends FullscreenToolView { drawShadow(canvas, cropped.left, cropped.bottom, cropped.right, displayBounds.bottom); canvas.drawRect(cropped, borderPaint); - boolean block = movingEdges == MOVE_BLOCK; - if (((movingEdges & MOVE_TOP) != 0) || block) { - drawIndicator(canvas, heightIndicator, cropped.centerX(), cropped.top); + boolean notMoving = movingEdges == 0; + if (((movingEdges & MOVE_TOP) != 0) || notMoving) { + drawIndicator(canvas, cropIndicator, cropped.centerX(), cropped.top); } - if (((movingEdges & MOVE_BOTTOM) != 0) || block) { - drawIndicator(canvas, heightIndicator, cropped.centerX(), cropped.bottom); + if (((movingEdges & MOVE_BOTTOM) != 0) || notMoving) { + drawIndicator(canvas, cropIndicator, cropped.centerX(), cropped.bottom); } - if (((movingEdges & MOVE_LEFT) != 0) || block) { - drawIndicator(canvas, widthIndicator, cropped.left, cropped.centerY()); + if (((movingEdges & MOVE_LEFT) != 0) || notMoving) { + drawIndicator(canvas, cropIndicator, cropped.left, cropped.centerY()); } - if (((movingEdges & MOVE_RIGHT) != 0) || block) { - drawIndicator(canvas, widthIndicator, cropped.right, cropped.centerY()); + if (((movingEdges & MOVE_RIGHT) != 0) || notMoving) { + drawIndicator(canvas, cropIndicator, cropped.right, cropped.centerY()); } } } |