summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/photoeditor
diff options
context:
space:
mode:
authorYuli Huang <yuli@google.com>2011-10-13 14:45:28 +0800
committerYuli Huang <yuli@google.com>2011-10-13 22:37:37 +0800
commitc22d67d46f1d7dbf3f77f4ec597c0cc3752a1ce6 (patch)
treeacd411fba5805586faa8cda19c95a366c6237d06 /src/com/android/gallery3d/photoeditor
parentbe074856000e2b417425585da0b4ffb36fc45bd1 (diff)
downloadandroid_packages_apps_Snap-c22d67d46f1d7dbf3f77f4ec597c0cc3752a1ce6.tar.gz
android_packages_apps_Snap-c22d67d46f1d7dbf3f77f4ec597c0cc3752a1ce6.tar.bz2
android_packages_apps_Snap-c22d67d46f1d7dbf3f77f4ec597c0cc3752a1ce6.zip
Fix UI.
1. Replace slider assets on tablets. 2. Add face-tan effect icon. 3. Change orange color to blue color in straighten effect to be consistent with crop effect. Change-Id: I073dea539d68d2a3d7782a520daa911879bc41cd
Diffstat (limited to 'src/com/android/gallery3d/photoeditor')
-rw-r--r--src/com/android/gallery3d/photoeditor/actions/CropView.java7
-rw-r--r--src/com/android/gallery3d/photoeditor/actions/RotateView.java13
2 files changed, 12 insertions, 8 deletions
diff --git a/src/com/android/gallery3d/photoeditor/actions/CropView.java b/src/com/android/gallery3d/photoeditor/actions/CropView.java
index 4a2ac5f10..0a709ee52 100644
--- a/src/com/android/gallery3d/photoeditor/actions/CropView.java
+++ b/src/com/android/gallery3d/photoeditor/actions/CropView.java
@@ -49,8 +49,6 @@ class CropView extends FullscreenToolView {
private static final int MIN_CROP_WIDTH_HEIGHT = 2;
private static final int TOUCH_TOLERANCE = 25;
private static final int SHADOW_ALPHA = 160;
- private static final int BORDER_COLOR = 0xFF008AFF;
- private static final float BORDER_WIDTH = 2.0f;
private final Paint borderPaint;
private final Drawable cropIndicator;
@@ -68,11 +66,12 @@ class CropView extends FullscreenToolView {
Resources resources = context.getResources();
cropIndicator = resources.getDrawable(R.drawable.camera_crop_holo);
indicatorSize = (int) resources.getDimension(R.dimen.crop_indicator_size);
+ int borderColor = resources.getColor(R.color.opaque_cyan);
borderPaint = new Paint();
borderPaint.setStyle(Paint.Style.STROKE);
- borderPaint.setColor(BORDER_COLOR);
- borderPaint.setStrokeWidth(BORDER_WIDTH);
+ borderPaint.setColor(borderColor);
+ borderPaint.setStrokeWidth(2f);
}
public void setOnCropChangeListener(OnCropChangeListener listener) {
diff --git a/src/com/android/gallery3d/photoeditor/actions/RotateView.java b/src/com/android/gallery3d/photoeditor/actions/RotateView.java
index c7cee5919..3598e32b8 100644
--- a/src/com/android/gallery3d/photoeditor/actions/RotateView.java
+++ b/src/com/android/gallery3d/photoeditor/actions/RotateView.java
@@ -24,6 +24,8 @@ import android.graphics.Path;
import android.util.AttributeSet;
import android.view.MotionEvent;
+import com.android.gallery3d.R;
+
/**
* View that shows grids and handles touch-events to adjust angle of rotation.
*/
@@ -49,6 +51,8 @@ class RotateView extends FullscreenToolView {
private final Paint dashStrokePaint;
private final Path grids = new Path();
private final Path referenceLine = new Path();
+ private final int gridsColor;
+ private final int referenceColor;
private OnRotateChangeListener listener;
private boolean drawGrids;
@@ -67,6 +71,9 @@ class RotateView extends FullscreenToolView {
dashStrokePaint.setAntiAlias(true);
dashStrokePaint.setStyle(Paint.Style.STROKE);
dashStrokePaint.setPathEffect(new DashPathEffect(new float[] {15.0f, 5.0f}, 1.0f));
+ dashStrokePaint.setStrokeWidth(2f);
+ gridsColor = context.getResources().getColor(R.color.translucent_white);
+ referenceColor = context.getResources().getColor(R.color.translucent_cyan);
}
public void setRotatedAngle(float degrees) {
@@ -132,13 +139,11 @@ class RotateView extends FullscreenToolView {
if (drawGrids) {
canvas.save();
canvas.clipRect(displayBounds);
- dashStrokePaint.setStrokeWidth(2f);
- dashStrokePaint.setColor(0x99CCCCCC);
+ dashStrokePaint.setColor(gridsColor);
canvas.drawPath(grids, dashStrokePaint);
canvas.rotate(-currentRotatedAngle * RADIAN_TO_DEGREE, centerX, centerY);
- dashStrokePaint.setStrokeWidth(2f);
- dashStrokePaint.setColor(0x99FFCC77);
+ dashStrokePaint.setColor(referenceColor);
canvas.drawPath(referenceLine, dashStrokePaint);
canvas.restore();
}