summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinkyu Kang <mk7.kang@samsung.com>2015-09-01 15:53:10 +0900
committerMinkyu Kang <mk7.kang@samsung.com>2015-09-01 15:53:10 +0900
commit66df2042e5d1d21c38fecc109c8773eb559a7367 (patch)
tree9d946b3c6e6824d912d756ff7a31c542d908fa42
parent427239978cb3b2f71523075017f3ed9f002712bf (diff)
downloadair_mediahub-66df2042e5d1d21c38fecc109c8773eb559a7367.tar.gz
air_mediahub-66df2042e5d1d21c38fecc109c8773eb559a7367.tar.bz2
air_mediahub-66df2042e5d1d21c38fecc109c8773eb559a7367.zip
viewer: add zoom button
Change-Id: I77e246785ceba006124c581adf41a226bbeb92eb Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
-rw-r--r--include/view/viewer.h3
-rw-r--r--res/edc/images/btn_view_contr_zoom_foc.pngbin0 -> 1872 bytes
-rw-r--r--res/edc/images/btn_view_contr_zoom_nor.pngbin0 -> 2022 bytes
-rw-r--r--res/edc/view/viewer.edc20
-rw-r--r--res/edc/widgets/button.edc40
-rw-r--r--src/view/viewer.c7
6 files changed, 69 insertions, 1 deletions
diff --git a/include/view/viewer.h b/include/view/viewer.h
index 2674ae8..559402b 100644
--- a/include/view/viewer.h
+++ b/include/view/viewer.h
@@ -58,6 +58,7 @@
#define SRC_BTN_GALLERY_PREV "prev_gallery"
#define SRC_BTN_GALLERY_NEXT "next_gallery"
#define SRC_BTN_ROTATE "rotate"
+#define SRC_BTN_ZOOM "zoom"
/* images */
#define IMAGE_VIEWER_FAVORITE "ic_title_favorite.png"
@@ -79,5 +80,7 @@
#define IMAGE_VIEWER_PHOTO_NEXT_NORMAL "btn_view_slide_next_nor.png"
#define IMAGE_VIEWER_ROTATE_FOCUS "btn_view_contr_rotate_foc.png"
#define IMAGE_VIEWER_ROTATE_NORMAL "btn_view_contr_rotate_nor.png"
+#define IMAGE_VIEWER_ZOOM_FOCUS "btn_view_contr_zoom_foc.png"
+#define IMAGE_VIEWER_ZOOM_NORMAL "btn_view_contr_zoom_nor.png"
#endif /* __AIR_MEDIAHUB_VIEW_VIEWER_H__ */
diff --git a/res/edc/images/btn_view_contr_zoom_foc.png b/res/edc/images/btn_view_contr_zoom_foc.png
new file mode 100644
index 0000000..da45740
--- /dev/null
+++ b/res/edc/images/btn_view_contr_zoom_foc.png
Binary files differ
diff --git a/res/edc/images/btn_view_contr_zoom_nor.png b/res/edc/images/btn_view_contr_zoom_nor.png
new file mode 100644
index 0000000..e5d69d4
--- /dev/null
+++ b/res/edc/images/btn_view_contr_zoom_nor.png
Binary files differ
diff --git a/res/edc/view/viewer.edc b/res/edc/view/viewer.edc
index 94f7b1e..29dd7a6 100644
--- a/res/edc/view/viewer.edc
+++ b/res/edc/view/viewer.edc
@@ -405,6 +405,26 @@ group {
}
}
part {
+ name: "control_btn6";
+ type: SWALLOW;
+ clip_to: "bottomarea";
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 114 143;
+ rel1 {
+ to: "control_btn5";
+ relative: 1.0 0.5;
+ }
+ rel2 {
+ to: "control_btn5";
+ relative: 1.0 0.5;
+ }
+ fixed: 1 1;
+ align: 0.0 0.5;
+ }
+ }
+ part {
name: "padding_time";
type: SPACER;
scale: 1;
diff --git a/res/edc/widgets/button.edc b/res/edc/widgets/button.edc
index 197a689..c796b32 100644
--- a/res/edc/widgets/button.edc
+++ b/res/edc/widgets/button.edc
@@ -1005,6 +1005,46 @@ group {
}
group {
+ name: "elm/button/base/viewer_btn_zoom";
+ inherit: "elm/button/base/viewer_btn_rotate";
+ images {
+ image: IMAGE_VIEWER_ZOOM_NORMAL COMP;
+ image: IMAGE_VIEWER_ZOOM_FOCUS COMP;
+ }
+ parts {
+ part {
+ name: "bg";
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ image {
+ normal: IMAGE_VIEWER_ZOOM_NORMAL;
+ }
+ }
+ description {
+ state: "selected" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: IMAGE_VIEWER_ZOOM_FOCUS;
+ }
+ }
+ description {
+ state: "clicked" 0.0;
+ image {
+ normal: IMAGE_VIEWER_ZOOM_FOCUS;
+ }
+ }
+ }
+ }
+ programs {
+ program {
+ name: "emit,signal";
+ action: SIGNAL_EMIT SIG_BTN_CALLBACK SRC_BTN_ZOOM;
+ }
+ }
+}
+
+group {
name: "elm/button/base/music_btn_prev";
inherit: "elm/button/base/viewer_btn_prev";
images {
diff --git a/src/view/viewer.c b/src/view/viewer.c
index 29f3a7f..ca82aad 100644
--- a/src/view/viewer.c
+++ b/src/view/viewer.c
@@ -47,6 +47,7 @@
#define BTN_LOC_PLAY 2
#define BTN_LOC_NEXT 4
#define BTN_LOC_ROTATE 5
+#define BTN_LOC_ZOOM 6
enum {
VIEWER_MOVIE,
@@ -114,6 +115,10 @@ static struct _btn_info btn_photo[] = {
.name = SRC_BTN_ROTATE,
.loc = BTN_LOC_ROTATE,
},
+ {
+ .name = SRC_BTN_ZOOM,
+ .loc = BTN_LOC_ZOOM,
+ },
};
static struct _btn_info btn_video[] = {
@@ -154,7 +159,7 @@ static struct _viewer_info viewer_info[] = {
},
{
.btns = btn_photo,
- .btn_count = 3,
+ .btn_count = 4,
.focus_loc = BTN_LOC_NEXT,
.callback = _callback_photo,
},