summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJisung Ahn <jcastle.ahn@samsung.com>2012-09-08 06:25:56 (GMT)
committerJisung Ahn <jcastle.ahn@samsung.com>2012-09-08 06:25:56 (GMT)
commit7bbb9cb8c50abc92c5d7310d4442466bb9f4ef68 (patch)
tree111ddf839466b18cb0971145cc06890c7f388f48
parentf04c491e25eadfebeb6f70d205c551d536b8b92a (diff)
downloadug-image-viewer-efl-7bbb9cb8c50abc92c5d7310d4442466bb9f4ef68.zip
ug-image-viewer-efl-7bbb9cb8c50abc92c5d7310d4442466bb9f4ef68.tar.gz
ug-image-viewer-efl-7bbb9cb8c50abc92c5d7310d4442466bb9f4ef68.tar.bz2
apply zoom icon
Change-Id: I02f660a7518a6fca3a930dcafb0cc3d273507e58
-rwxr-xr-xmain/layout/ivug-main.edc4
-rwxr-xr-xmain/src/view/ivug-details-view.c3
-rwxr-xr-xmain/src/view/ivug-main-view.cpp48
3 files changed, 47 insertions, 8 deletions
diff --git a/main/layout/ivug-main.edc b/main/layout/ivug-main.edc
index 76264ea..d1c6b8c 100755
--- a/main/layout/ivug-main.edc
+++ b/main/layout/ivug-main.edc
@@ -228,7 +228,7 @@ group {
type: IMAGE;
scale: 1;
- mouse_events: 0;
+ mouse_events: 1;
description {
visible: 1;
fixed: 1 1;
@@ -295,7 +295,7 @@ group {
type: IMAGE;
scale: 1;
- mouse_events: 0;
+ mouse_events: 1;
description {
visible: 1;
fixed: 1 1;
diff --git a/main/src/view/ivug-details-view.c b/main/src/view/ivug-details-view.c
index 77fefdb..cdee222 100755
--- a/main/src/view/ivug-details-view.c
+++ b/main/src/view/ivug-details-view.c
@@ -273,7 +273,8 @@ static void _on_rename_view_response(ivug_name_response resp, const char *str, v
free(mdata->filepath);
mdata->filepath = strdup(new_fullpath);
- ivug_details_info_set_filename(&pDetailsView->file_Info, new_fullpath);
+ ivug_details_info_set_filename(&pDetailsView->file_Info, new_fullpath);
+ ivug_details_info_set_location(&pDetailsView->file_Info, new_fullpath);
elm_genlist_realized_items_update(pDetailsView->genlist);
diff --git a/main/src/view/ivug-main-view.cpp b/main/src/view/ivug-main-view.cpp
index c5bbf3d..6a4b543 100755
--- a/main/src/view/ivug-main-view.cpp
+++ b/main/src/view/ivug-main-view.cpp
@@ -1155,9 +1155,20 @@ _ivug_main_view_zoom_out_cb(void *data, Evas_Object *obj, const char *emission,
MSG_MAIN_ERROR("_ivug_main_view_zoom_out_cb");
- Ivug_MainView *pMainView = (Ivug_MainView *)data;
-
- ivug_slider_zoom_out(pMainView->slider);
+ Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+ int value = (int)elm_slider_value_get(pMainView->zoom_slider);
+
+ if(value > 1)
+ {
+ ivug_main_view_del_hide_timer(pMainView);
+
+ ivug_slider_zoom_out(pMainView->slider);
+ pMainView->zoom_level--;
+ elm_slider_value_set(pMainView->zoom_slider, value-1.0);
+
+ ivug_main_view_set_hide_timer(pMainView);
+ }
_show_zoom_icon(data);
}
@@ -1170,9 +1181,20 @@ _ivug_main_view_zoom_in_cb(void *data, Evas_Object *obj, const char *emission, c
MSG_MAIN_ERROR("_ivug_main_view_zoom_in_cb");
- Ivug_MainView *pMainView = (Ivug_MainView *)data;
+ Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+ int value = (int)elm_slider_value_get(pMainView->zoom_slider);
- ivug_slider_zoom_in(pMainView->slider);
+ if(value <= ZOOM_LEVEL_MAX)
+ {
+ ivug_main_view_del_hide_timer(pMainView);
+
+ ivug_slider_zoom_in(pMainView->slider);
+ pMainView->zoom_level++;
+ elm_slider_value_set(pMainView->zoom_slider, value+1.0);
+
+ ivug_main_view_set_hide_timer(pMainView);
+ }
_show_zoom_icon(data);
}
@@ -1201,6 +1223,20 @@ static void _zoom_slider_change_cb(void *data, Evas_Object *obj, void *event_inf
}
}
}
+
+static void _zoom_slider_start_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+ ivug_main_view_del_hide_timer(pMainView);
+}
+
+static void _zoom_slider_end_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+ ivug_main_view_set_hide_timer(pMainView);
+}
Ivug_MainView *
ivug_main_view_create(Evas_Object* parent, ivug_mode mode, ivug_view_by view_by)
@@ -1340,6 +1376,8 @@ ivug_main_view_create(Evas_Object* parent, ivug_mode mode, ivug_view_by view_by)
//evas_object_smart_callback_add(slider, "slider,drag,start", _slider_ebook_drag_start_cb, slider);
//evas_object_smart_callback_add(slider, "slider,drag,stop", _slider_ebook_drag_stop_cb, slider);
evas_object_smart_callback_add(slider, "changed", _zoom_slider_change_cb, pMainView);
+ evas_object_smart_callback_add(slider, "slider,drag,start", _zoom_slider_start_cb, pMainView);
+ evas_object_smart_callback_add(slider, "slider,drag,stop", _zoom_slider_end_cb, pMainView);
elm_object_part_content_set(pMainView->empty_layout, "zoom_slider_area", slider); //swallow