summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSangpyo Kim <sangpyo7.kim@samsung.com>2012-08-27 15:34:13 +0900
committerSangpyo Kim <sangpyo7.kim@samsung.com>2012-08-27 15:37:15 +0900
commit06b668cbdb9827497bc889b90a8ac73e94f6206d (patch)
tree498089967577ec776448faea77057619edad9c23 /src
parente5c2f78343e3a71fdfc3e40a1f4430327d7652c8 (diff)
downloadorg.tizen.browser-06b668cbdb9827497bc889b90a8ac73e94f6206d.tar.gz
org.tizen.browser-06b668cbdb9827497bc889b90a8ac73e94f6206d.tar.bz2
org.tizen.browser-06b668cbdb9827497bc889b90a8ac73e94f6206d.zip
[Title] hiding zoom button when the zoom is not available.
[Issue#] N_SE-5910 [Problem] Zoom is not available at some pages [Cause] some of webpages have fixed scale factor. [Solution] hiding the zoom button when the zoom is not available [Team] Browser UI [Developer] sangpyo7.kim [Request] N/A Change-Id: I2b9cb66627d406d6491a08bc79d0316a11dd0de9
Diffstat (limited to 'src')
-rwxr-xr-xsrc/browser-view/browser-view.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/browser-view/browser-view.cpp b/src/browser-view/browser-view.cpp
index cbfa592..82b9a8f 100755
--- a/src/browser-view/browser-view.cpp
+++ b/src/browser-view/browser-view.cpp
@@ -1306,7 +1306,7 @@ void Browser_View::__ewk_view_mouse_down_cb(void* data, Evas* evas, Evas_Object*
BROWSER_LOGD("__ewk_view_mouse_down_cb");
#ifdef ZOOM_BUTTON
- double sacle_factor = ewk_view_scale_get(browser_view->m_focused_window->m_ewk_view);
+ double scale_factor = ewk_view_scale_get(browser_view->m_focused_window->m_ewk_view);
double min_scale = 0;
double max_scale = 0;
@@ -1319,10 +1319,15 @@ void Browser_View::__ewk_view_mouse_down_cb(void* data, Evas* evas, Evas_Object*
if (zoom_button_flag == false)
return;
- if (browser_view->m_zoom_button_timer)
- ecore_timer_del(browser_view->m_zoom_button_timer);
- browser_view->m_zoom_button_timer = ecore_timer_add(3, __zoom_button_timeout_cb, browser_view);
- edje_object_signal_emit(elm_layout_edje_get(browser_view->m_main_layout), "show,zoom_buttons,signal", "");
+
+ ewk_view_scale_range_get(browser_view->m_focused_window->m_ewk_view,
+ &min_scale, &max_scale);
+ if (scale_factor > min_scale && scale_factor < max_scale) {
+ if (browser_view->m_zoom_button_timer)
+ ecore_timer_del(browser_view->m_zoom_button_timer);
+ browser_view->m_zoom_button_timer = ecore_timer_add(3, __zoom_button_timeout_cb, browser_view);
+ edje_object_signal_emit(elm_layout_edje_get(browser_view->m_main_layout), "show,zoom_buttons,signal", "");
+ }
#endif
}