From 072501c88260140f48435459f55bc50c7a310447 Mon Sep 17 00:00:00 2001 From: Cedric Bail Date: Fri, 19 Jul 2013 15:39:49 +0900 Subject: [PATCH] edje: add threshold to draggable part. --- edje/Makefile.am | 1 + unsorted/edje/edje-threshold.edc | 87 ++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 unsorted/edje/edje-threshold.edc diff --git a/edje/Makefile.am b/edje/Makefile.am index fc3ec351..5d5dfa85 100644 --- a/edje/Makefile.am +++ b/edje/Makefile.am @@ -11,6 +11,7 @@ endif #put here all EDCs one needs to the examples EDCS = \ +edje-threshold.edc \ animations2.edc \ animations.edc \ basic2.edc \ diff --git a/unsorted/edje/edje-threshold.edc b/unsorted/edje/edje-threshold.edc new file mode 100644 index 00000000..1216c2bb --- /dev/null +++ b/unsorted/edje/edje-threshold.edc @@ -0,0 +1,87 @@ +collections { + group { + name: "main"; + parts { + part { + type: RECT; + name: background; + mouse_events: 0; + description { + color: 0 0 0 255; + } + } + part { + type: RECT; + name: "area/vertical"; + mouse_events: 0; + description { + color: 255 0 0 255; + align: 0.5 0; + min: 20 30; + max: 20 -1; + } + } + part { + type: RECT; + name: "area/horizontal"; + mouse_events: 0; + description { + color: 255 0 0 255; + align: 0 0.5; + min: 30 20; + max: -1 20; + } + } + part { + type: RECT; + name: "threshold/horizontal"; + mouse_events: 0; + description { + color: 0 0 255 255; + rel1 { + to: "drag/horizontal"; + offset: -13 -13; + } + rel2 { + to: "drag/horizontal"; + offset: +12 +12; + } + } + } + part { + type: RECT; + name: "drag/horizontal"; + mouse_events: 1; + dragable { + confine: "area/horizontal"; + threshold: "threshold/horizontal"; + x: 1 1 0; + y: 0 0 0; + } + description { + aspect: 1 1; + color: 0 255 0 255; + min: 20 20; + max: 20 20; + } + } + part { + type: RECT; + name: "drag/vertical"; + mouse_events: 1; + dragable { + confine: "area/vertical"; + threshold: "threshold/horizontal"; + x: 0 0 0; + y: 1 1 0; + } + description { + aspect: 1 1; + color: 0 255 255 255; + min: 20 20; + max: 20 20; + } + } + } + } +}