Hi,
When elm_map doing zooming by using wheel gesture, scroller is resized
if it exceeds certain limit.
But current limit value is 2.0 & 1.0, actually those should be below
2.0 and above 1.0.
The reason is that resizing means exactly 2.0 or 1.0. So if it is
above 1.99x, it can be 2.0 and can be resized.
In addition, pinch.level & pinch.diff values should not be 1.0 or 2.0
for more accuracy. It should be half of previous pinch level or two
times of that.
Please review this.
--
BRs,
Kim.
Index: src/lib/elm_map.c
===================================================================
--- src/lib/elm_map.c (리비전 66618)
+++ src/lib/elm_map.c (작업 사본)
@@ -1658,20 +1658,20 @@
wd->pinch.cx = x + ((double)w * 0.5);
wd->pinch.cy = y + ((double)h * 0.5);
- if (wd->pinch.level > 2.0 || wd->pinch.level < 1.0)
+ if (wd->pinch.level > 1.99 || wd->pinch.level < 1.01)
{
wd->wheel_diff = 0;
- if (wd->pinch.level > 2.0)
+ if (wd->pinch.level > 1.99)
{
zoom_diff = 1;
- wd->pinch.diff = 1.0;
- wd->pinch.level = 1.0;
+ wd->pinch.diff = wd->pinch.level / 2.0;
+ wd->pinch.level = wd->pinch.level / 2.0;
}
- else if (wd->pinch.level < 1.0)
+ else if (wd->pinch.level < 1.01)
{
zoom_diff = -1;
- wd->pinch.diff = 2.0;
- wd->pinch.level = 2.0;
+ wd->pinch.diff = wd->pinch.level * 2.0;
+ wd->pinch.level = wd->pinch.level * 2.0;
}
Elm_Map_Zoom_Mode temp;
@@ -2839,6 +2839,8 @@
elm_smart_scroller_freeze_set(wd->scr, 1);
_scr_drag_start(wd->obj, NULL, NULL);
+ wd->pinch.diff += 0.001;
+
return EVAS_EVENT_FLAG_NONE;
}
@@ -2875,19 +2877,19 @@
wd->pinch.cx = x + ((double)w * 0.5);
wd->pinch.cy = y + ((double)h * 0.5);
- if (wd->pinch.level > 2.0 || wd->pinch.level < 1.0)
+ if (wd->pinch.level > 1.999 || wd->pinch.level < 1.001)
{
- if (wd->pinch.level > 2.0)
+ if (wd->pinch.level > 1.999)
{
zoom_diff = 1;
- wd->pinch.diff = 1.0;
- wd->pinch.level = 1.0;
+ wd->pinch.diff = wd->pinch.level / 2.0;
+ wd->pinch.level = wd->pinch.level / 2.0;
}
- else if (wd->pinch.level < 1.0)
+ else if (wd->pinch.level < 1.001)
{
zoom_diff = -1;
- wd->pinch.diff = 2.0;
- wd->pinch.level = 2.0;
+ wd->pinch.diff = wd->pinch.level * 2.0;
+ wd->pinch.level = wd->pinch.level * 2.0;
}
Elm_Map_Zoom_Mode temp;
elm_gesture_layer_cb_set(wd->ges, ELM_GESTURE_ZOOM, ELM_GESTURE_STATE_MOVE, NULL, wd); // ei->zoom is refreshed
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel