summaryrefslogtreecommitdiffstats
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
commit85bc435c06ace72f5da72475e9b03b0ada9455e0 (patch)
tree836b533b9fbd9d60dc2e3fe96147a5ab799ed29f
parent532d93caddc91a7aa33ca113adbc0b8255d498eb (diff)
downloadandroid_packages_apps_Gallery2-85bc435c06ace72f5da72475e9b03b0ada9455e0.tar.gz
android_packages_apps_Gallery2-85bc435c06ace72f5da72475e9b03b0ada9455e0.tar.bz2
android_packages_apps_Gallery2-85bc435c06ace72f5da72475e9b03b0ada9455e0.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
-rw-r--r--res/drawable-sw600dp/photoeditor_scale_seekbar_color.pngbin2623 -> 3327 bytes
-rw-r--r--res/drawable-sw600dp/photoeditor_scale_seekbar_generic.pngbin1667 -> 2134 bytes
-rw-r--r--res/drawable-sw600dp/photoeditor_scale_seekbar_light.pngbin2064 -> 2877 bytes
-rw-r--r--res/drawable-sw600dp/photoeditor_scale_seekbar_shadow.pngbin2193 -> 2838 bytes
-rw-r--r--res/drawable/photoeditor_effect_facetan.pngbin0 -> 2868 bytes
-rwxr-xr-xres/values-sw600dp/photoeditor_dimens.xml2
-rwxr-xr-xres/values-sw800dp/photoeditor_dimens.xml2
-rw-r--r--res/values/photoeditor_colors.xml3
-rw-r--r--src/com/android/gallery3d/photoeditor/actions/CropView.java7
-rw-r--r--src/com/android/gallery3d/photoeditor/actions/RotateView.java13
10 files changed, 17 insertions, 10 deletions
diff --git a/res/drawable-sw600dp/photoeditor_scale_seekbar_color.png b/res/drawable-sw600dp/photoeditor_scale_seekbar_color.png
index e9f46e41d..addc62959 100644
--- a/res/drawable-sw600dp/photoeditor_scale_seekbar_color.png
+++ b/res/drawable-sw600dp/photoeditor_scale_seekbar_color.png
Binary files differ
diff --git a/res/drawable-sw600dp/photoeditor_scale_seekbar_generic.png b/res/drawable-sw600dp/photoeditor_scale_seekbar_generic.png
index 5d9300091..488f927b4 100644
--- a/res/drawable-sw600dp/photoeditor_scale_seekbar_generic.png
+++ b/res/drawable-sw600dp/photoeditor_scale_seekbar_generic.png
Binary files differ
diff --git a/res/drawable-sw600dp/photoeditor_scale_seekbar_light.png b/res/drawable-sw600dp/photoeditor_scale_seekbar_light.png
index bbf2ac897..b0b9c0d0d 100644
--- a/res/drawable-sw600dp/photoeditor_scale_seekbar_light.png
+++ b/res/drawable-sw600dp/photoeditor_scale_seekbar_light.png
Binary files differ
diff --git a/res/drawable-sw600dp/photoeditor_scale_seekbar_shadow.png b/res/drawable-sw600dp/photoeditor_scale_seekbar_shadow.png
index e7d81e957..608acbdf1 100644
--- a/res/drawable-sw600dp/photoeditor_scale_seekbar_shadow.png
+++ b/res/drawable-sw600dp/photoeditor_scale_seekbar_shadow.png
Binary files differ
diff --git a/res/drawable/photoeditor_effect_facetan.png b/res/drawable/photoeditor_effect_facetan.png
new file mode 100644
index 000000000..673a982f6
--- /dev/null
+++ b/res/drawable/photoeditor_effect_facetan.png
Binary files differ
diff --git a/res/values-sw600dp/photoeditor_dimens.xml b/res/values-sw600dp/photoeditor_dimens.xml
index 1162b4571..980272713 100755
--- a/res/values-sw600dp/photoeditor_dimens.xml
+++ b/res/values-sw600dp/photoeditor_dimens.xml
@@ -30,7 +30,7 @@
<dimen name="action_button_padding_horizontal">22dp</dimen>
<dimen name="effect_tool_panel_padding">13dp</dimen>
<dimen name="seekbar_width">560dp</dimen>
- <dimen name="seekbar_height">23dp</dimen>
+ <dimen name="seekbar_height">35dp</dimen>
<dimen name="seekbar_margin_bottom">4dp</dimen>
<dimen name="crop_indicator_size">43dp</dimen>
</resources>
diff --git a/res/values-sw800dp/photoeditor_dimens.xml b/res/values-sw800dp/photoeditor_dimens.xml
index 44791d596..1bcc28d45 100755
--- a/res/values-sw800dp/photoeditor_dimens.xml
+++ b/res/values-sw800dp/photoeditor_dimens.xml
@@ -30,7 +30,7 @@
<dimen name="action_button_padding_horizontal">28dp</dimen>
<dimen name="effect_tool_panel_padding">15dp</dimen>
<dimen name="seekbar_width">560dp</dimen>
- <dimen name="seekbar_height">23dp</dimen>
+ <dimen name="seekbar_height">35dp</dimen>
<dimen name="seekbar_margin_bottom">5dp</dimen>
<dimen name="crop_indicator_size">48dp</dimen>
</resources>
diff --git a/res/values/photoeditor_colors.xml b/res/values/photoeditor_colors.xml
index 9899924c0..dfcc9136f 100644
--- a/res/values/photoeditor_colors.xml
+++ b/res/values/photoeditor_colors.xml
@@ -16,6 +16,9 @@
<resources>
<color name="translucent_black">#67000000</color>
+ <color name="translucent_white">#99CCCCCC</color>
+ <color name="translucent_cyan">#99008AFF</color>
+ <color name="opaque_cyan">#FF008AFF</color>
<color name="color_picker_preset_color1">#ddff1e00</color>
<color name="color_picker_preset_color2">#ddff5b00</color>
<color name="color_picker_preset_color3">#ddff9900</color>
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();
}