diff options
author | John Hoford <hoford@google.com> | 2013-08-29 16:47:46 -0700 |
---|---|---|
committer | John Hoford <hoford@google.com> | 2013-08-29 17:01:32 -0700 |
commit | ae068f80895d7d075064a5ded59069425b72271f (patch) | |
tree | 3a71026419b82f15b7d259dda41ab5cd898c0b31 /src/com/android/gallery3d/filtershow/filters | |
parent | 834efce0da12e6a4664c3f3c63bfd2e77b6e750a (diff) | |
download | android_packages_apps_Gallery2-ae068f80895d7d075064a5ded59069425b72271f.tar.gz android_packages_apps_Gallery2-ae068f80895d7d075064a5ded59069425b72271f.tar.bz2 android_packages_apps_Gallery2-ae068f80895d7d075064a5ded59069425b72271f.zip |
small ui cleanups for color border
Change-Id: I76142afdb44a45936bf32a36b3b45ffdc729308e
Diffstat (limited to 'src/com/android/gallery3d/filtershow/filters')
-rw-r--r-- | src/com/android/gallery3d/filtershow/filters/FilterColorBorderRepresentation.java | 14 | ||||
-rw-r--r-- | src/com/android/gallery3d/filtershow/filters/FilterDrawRepresentation.java | 1 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/com/android/gallery3d/filtershow/filters/FilterColorBorderRepresentation.java b/src/com/android/gallery3d/filtershow/filters/FilterColorBorderRepresentation.java index eb9f53020..4f625d7b4 100644 --- a/src/com/android/gallery3d/filtershow/filters/FilterColorBorderRepresentation.java +++ b/src/com/android/gallery3d/filtershow/filters/FilterColorBorderRepresentation.java @@ -22,14 +22,11 @@ import android.util.JsonWriter; import com.android.gallery3d.R; import com.android.gallery3d.filtershow.controller.BasicParameterInt; -import com.android.gallery3d.filtershow.controller.BasicParameterStyle; import com.android.gallery3d.filtershow.controller.Parameter; import com.android.gallery3d.filtershow.controller.ParameterColor; import com.android.gallery3d.filtershow.editors.EditorColorBorder; -import com.android.gallery3d.filtershow.editors.ImageOnlyEditor; import java.io.IOException; -import java.util.ArrayList; public class FilterColorBorderRepresentation extends FilterRepresentation { private static final String LOGTAG = "FilterColorBorderRepresentation"; @@ -43,8 +40,8 @@ public class FilterColorBorderRepresentation extends FilterRepresentation { public static int DEFAULT_MENU_COLOR3 = Color.GRAY; public static int DEFAULT_MENU_COLOR4 = 0xFFFFCCAA; public static int DEFAULT_MENU_COLOR5 = 0xFFAAAAAA; - private BasicParameterInt mParamSize = new BasicParameterInt(PARAM_SIZE, 4, 2, 30); - private BasicParameterInt mParamRadius = new BasicParameterInt(PARAM_RADIUS, 4, 2, 100); + private BasicParameterInt mParamSize = new BasicParameterInt(PARAM_SIZE, 3, 2, 30); + private BasicParameterInt mParamRadius = new BasicParameterInt(PARAM_RADIUS, 2, 0, 100); private ParameterColor mParamColor = new ParameterColor(PARAM_COLOR, DEFAULT_MENU_COLOR1); private Parameter[] mAllParam = { @@ -65,6 +62,12 @@ public class FilterColorBorderRepresentation extends FilterRepresentation { mParamColor.setValue(color); mParamSize.setValue(size); mParamRadius.setValue(radius); + mParamColor.setColorpalette(new int[]{ + DEFAULT_MENU_COLOR1, + DEFAULT_MENU_COLOR2, + DEFAULT_MENU_COLOR3, + DEFAULT_MENU_COLOR4, + DEFAULT_MENU_COLOR5}); } public String toString() { @@ -90,6 +93,7 @@ public class FilterColorBorderRepresentation extends FilterRepresentation { FilterColorBorderRepresentation representation = (FilterColorBorderRepresentation) a; setName(representation.getName()); setColor(representation.getColor()); + mParamColor.copyPalletFrom(representation.mParamColor); setBorderSize(representation.getBorderSize()); setBorderRadius(representation.getBorderRadius()); } diff --git a/src/com/android/gallery3d/filtershow/filters/FilterDrawRepresentation.java b/src/com/android/gallery3d/filtershow/filters/FilterDrawRepresentation.java index d4b4e87fa..f3245739f 100644 --- a/src/com/android/gallery3d/filtershow/filters/FilterDrawRepresentation.java +++ b/src/com/android/gallery3d/filtershow/filters/FilterDrawRepresentation.java @@ -205,6 +205,7 @@ public class FilterDrawRepresentation extends FilterRepresentation { public void useParametersFrom(FilterRepresentation a) { if (a instanceof FilterDrawRepresentation) { FilterDrawRepresentation representation = (FilterDrawRepresentation) a; + mParamColor.copyPalletFrom(representation.mParamColor); try { if (representation.mCurrent != null) { mCurrent = (StrokeData) representation.mCurrent.clone(); |