Fellows,
Attached you can find a simple and _exaggerated_ test of a problem I
found while developing an application. Consider that we have quite
many small rectangles placed together that will form the main menu of
the application. But I would like to display those small rectangles
rotated on Z 45 degrees.
Running the application on the desktop environment with mouse works
fine. But when I ran it on a touchscreen device it showed that it was
almost impossible to click on a rectangle. There are other places on
the application where we use the same macro used for the menu
rectangles for buttons, which are not rotated and thus don't suffer
with the click issue.
What I could find while debugging the problem is that when you click
with the mouse, there is a mouse,down,1 event and right after that a
mouse,up,1 and a mouse,clicked,1 event. While in the touchscreen
device, between the mouse,down,1 and mouse,up,1 event there are many
mouse,move events. Here is where the problem happens. If the part is
not rotated, it still receives the mouse,click,1 event, while it
doesn't always happen if the part is rotated.
To reproduce the problem, just take the .edc attached, generate the
edj and use edje_player to view it. Hold mouse button 1 on a
rectangle, do some mouse moves and release the button on the area of
that rectangle you clicked. You will note that on the rectangle that
is not rotated, no matter where you moved the mouse, it will receive
the mouse,click event.
Thanks in advance for your help.
Best Regards, Etrunko
--
Eduardo de Barros Lima
ebl...@gmail.com
collections {
group {
name: "main";
min: 480 640;
max: 480 640;
parts {
part {
name: "background";
type: RECT;
mouse_events: 0;
description {
color: 255 255 255 255;
}
}
part {
name: "rotated";
type: GROUP;
source: "group_rotated";
description {
rel2 {
relative: 0.0 0.0;
offset: 239 319;
}
map {
on: 1;
smooth: 1;
rotation.z: 45.0;
}
}
}
part {
name: "not_rotated";
type: GROUP;
source: "group_not_rotated";
description {
rel1 {
to: "rotated";
relative: 0.0 1.0;
}
}
}
}
}
group {
name: "group_rotated";
parts {
part {
name: "rect_rotated";
type: RECT;
mouse_events: 1;
description {
state: "default" 0.0;
color: 255 0 0 100;
rel1.offset: 50 50;
rel2.offset: -49 -49;
}
description {
state: "clicked" 0.0;
inherit: "default" 0.0;
color: 0 255 0 255;
}
}
}
programs {
program {
name: "rect_rotated_clicked";
signal: "mouse,clicked,1";
source: "rect_rotated";
action: STATE_SET "clicked" 0.0;
target: "rect_rotated";
transition: DECELERATE 0.5;
after: "rect_rotated_highlight";
}
program {
name: "rect_rotated_highlight";
action: STATE_SET "default" 0.0;
target: "rect_rotated";
transition: ACCELERATE 0.5;
}
}
}
group {
name: "group_not_rotated";
parts {
part {
name: "rect_not_rotated";
type: RECT;
mouse_events: 1;
description {
state: "default" 0.0;
color: 0 255 0 100;
rel1.offset: 50 50;
rel2.offset: -49 -49;
}
description {
state: "clicked" 0.0;
inherit: "default" 0.0;
color: 255 0 0 255;
}
}
}
programs {
program {
name: "rect_not_rotated_clicked";
signal: "mouse,clicked,1";
source: "rect_not_rotated";
action: STATE_SET "clicked" 0.0;
target: "rect_not_rotated";
transition: DECELERATE 0.5;
after: "rect_not_rotated_highlight";
}
program {
name: "rect_not_rotated_highlight";
action: STATE_SET "default" 0.0;
target: "rect_not_rotated";
transition: ACCELERATE 0.5;
}
}
}
}
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:
Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel