diff options
author | Minkyu Kang <mk7.kang@samsung.com> | 2015-08-31 12:47:52 +0900 |
---|---|---|
committer | Minkyu Kang <mk7.kang@samsung.com> | 2015-08-31 12:47:52 +0900 |
commit | 2edb324f8b9abffa4dd36735b6c8cb4c86d75d11 (patch) | |
tree | aeb15a9c6af2050c65e898d362c4702492c6ad5f | |
parent | dca3a030bce0111f11eee9863a11e6448d97410d (diff) | |
download | air_mediahub-2edb324f8b9abffa4dd36735b6c8cb4c86d75d11.tar.gz air_mediahub-2edb324f8b9abffa4dd36735b6c8cb4c86d75d11.tar.bz2 air_mediahub-2edb324f8b9abffa4dd36735b6c8cb4c86d75d11.zip |
viewer: add rotate button
Change-Id: I0304226dc2b42990010428d3e81c159d1994a60e
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
-rw-r--r-- | include/view/viewer.h | 3 | ||||
-rw-r--r-- | res/edc/images/btn_view_contr_rotate_foc.png | bin | 0 -> 3938 bytes | |||
-rw-r--r-- | res/edc/images/btn_view_contr_rotate_nor.png | bin | 0 -> 4008 bytes | |||
-rw-r--r-- | res/edc/view/viewer.edc | 21 | ||||
-rw-r--r-- | res/edc/widgets/button.edc | 41 | ||||
-rw-r--r-- | src/view/viewer.c | 7 |
6 files changed, 71 insertions, 1 deletions
diff --git a/include/view/viewer.h b/include/view/viewer.h index 47307dc..2674ae8 100644 --- a/include/view/viewer.h +++ b/include/view/viewer.h @@ -57,6 +57,7 @@ #define SRC_BTN_NEXT "next" #define SRC_BTN_GALLERY_PREV "prev_gallery" #define SRC_BTN_GALLERY_NEXT "next_gallery" +#define SRC_BTN_ROTATE "rotate" /* images */ #define IMAGE_VIEWER_FAVORITE "ic_title_favorite.png" @@ -76,5 +77,7 @@ #define IMAGE_VIEWER_PHOTO_PREV_NORMAL "btn_view_slide_previous_nor.png" #define IMAGE_VIEWER_PHOTO_NEXT_FOCUS "btn_view_slide_next_foc.png" #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" #endif /* __AIR_MEDIAHUB_VIEW_VIEWER_H__ */ diff --git a/res/edc/images/btn_view_contr_rotate_foc.png b/res/edc/images/btn_view_contr_rotate_foc.png Binary files differnew file mode 100644 index 0000000..343f481 --- /dev/null +++ b/res/edc/images/btn_view_contr_rotate_foc.png diff --git a/res/edc/images/btn_view_contr_rotate_nor.png b/res/edc/images/btn_view_contr_rotate_nor.png Binary files differnew file mode 100644 index 0000000..a4bc750 --- /dev/null +++ b/res/edc/images/btn_view_contr_rotate_nor.png diff --git a/res/edc/view/viewer.edc b/res/edc/view/viewer.edc index 2c8b446..94f7b1e 100644 --- a/res/edc/view/viewer.edc +++ b/res/edc/view/viewer.edc @@ -283,6 +283,7 @@ group { visible: 0; } } + /* controller buttons */ part { name: "control_btn0"; type: SWALLOW; @@ -383,6 +384,26 @@ group { align: 0.0 0.5; } } + /* extra buttons */ + part { + name: "control_btn5"; + type: SWALLOW; + clip_to: "bottomarea"; + scale: 1; + description { + state: "default" 0.0; + min: 114 143; + rel1 { + to: "bottomarea"; + } + rel2 { + to: "bottomarea"; + relative: 0.0 1.0; + } + fixed: 1 1; + align: 0.0 0.5; + } + } part { name: "padding_time"; type: SPACER; diff --git a/res/edc/widgets/button.edc b/res/edc/widgets/button.edc index 60f2caa..197a689 100644 --- a/res/edc/widgets/button.edc +++ b/res/edc/widgets/button.edc @@ -964,6 +964,47 @@ group { } group { + name: "elm/button/base/viewer_btn_rotate"; + inherit: "elm/button/base/viewer_btn_prev"; + images { + image: IMAGE_VIEWER_ROTATE_NORMAL COMP; + image: IMAGE_VIEWER_ROTATE_FOCUS COMP; + } + parts { + part { + name: "bg"; + scale: 1; + description { + state: "default" 0.0; + min: 114 143; + image { + normal: IMAGE_VIEWER_ROTATE_NORMAL; + } + } + description { + state: "selected" 0.0; + inherit: "default" 0.0; + image { + normal: IMAGE_VIEWER_ROTATE_FOCUS; + } + } + description { + state: "clicked" 0.0; + image { + normal: IMAGE_VIEWER_ROTATE_FOCUS; + } + } + } + } + programs { + program { + name: "emit,signal"; + action: SIGNAL_EMIT SIG_BTN_CALLBACK SRC_BTN_ROTATE; + } + } +} + +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 f3e768a..6fd38d5 100644 --- a/src/view/viewer.c +++ b/src/view/viewer.c @@ -44,6 +44,7 @@ #define BTN_LOC_PREV 0 #define BTN_LOC_PLAY 2 #define BTN_LOC_NEXT 4 +#define BTN_LOC_ROTATE 5 enum { VIEWER_MOVIE, @@ -113,6 +114,10 @@ static struct _btn_info btn_photo[] = { .name = SRC_BTN_GALLERY_NEXT, .loc = BTN_LOC_NEXT, }, + { + .name = SRC_BTN_ROTATE, + .loc = BTN_LOC_ROTATE, + }, }; static struct _btn_info btn_video[] = { @@ -153,7 +158,7 @@ static struct _viewer_info viewer_info[] = { }, { .btns = btn_photo, - .btn_count = 2, + .btn_count = 3, .focus_loc = BTN_LOC_NEXT, .callback = _callback_photo, }, |