okra pushed a commit to branch master. http://git.enlightenment.org/apps/ephoto.git/commit/?id=a74197b4a210ee6d574a47bea47ee64cb4206f9c
commit a74197b4a210ee6d574a47bea47ee64cb4206f9c Author: Stephen Houston <smhousto...@gmail.com> Date: Mon Feb 2 13:54:18 2015 -0600 Ephoto: Add new files to install edje. --- data/themes/Makefile.am | 16 ++++++ data/themes/crop.edc | 144 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 160 insertions(+) diff --git a/data/themes/Makefile.am b/data/themes/Makefile.am new file mode 100644 index 0000000..642ef7c --- /dev/null +++ b/data/themes/Makefile.am @@ -0,0 +1,16 @@ +MAINTAINERCLEANFILES = Makefile.in Makefile + +EDJE_CC = @edje_cc@ + +filesdir = $(datadir)/$(PACKAGE)/themes +files_DATA = crop.edj + +EXTRA_DIST = crop.edc + +crop.edj: Makefile $(EXTRA_DIST) + $(EDJE_CC) \ + $(top_srcdir)/data/themes/crop.edc \ + $(top_builddir)/data/themes/crop.edj + +clean-local: + rm -f *.edj diff --git a/data/themes/crop.edc b/data/themes/crop.edc new file mode 100644 index 0000000..dc68409 --- /dev/null +++ b/data/themes/crop.edc @@ -0,0 +1,144 @@ +collections { +group { name: "image_cropper"; + parts { + part { name: "background"; + type: RECT; + description { state: "default" 0.0; + color: 255 255 255 0; + } + } + part { name: "clipper"; + type: RECT; + description { state: "default" 0.0; + color: 0 0 0 0; + } + description { state: "show" 0.0; + color: 255 255 255 255; + } + } + part { name: "ephoto.swallow.image"; + type: SWALLOW; + scale: 1; + mouse_events: 0; + clip_to: "clipper"; + description { state: "default" 0.0; + } + } + part { name: "shader_top"; + type: RECT; + scale: 1; + mouse_events: 0; + clip_to: "clipper"; + description { state: "default" 0.0; + color: 0 0 0 200; + rel1.to: "clipper"; + rel1.relative: 0.0 0.0; + rel2.to: "cropper"; + rel2.relative: 1.0 0.0; + } + } + part { name: "shader_left"; + type: RECT; + scale: 1; + mouse_events: 0; + clip_to: "clipper"; + description { state: "default" 0.0; + color: 0 0 0 200; + rel1.to: "shader_top"; + rel1.relative: 0.0 1.0; + rel2.to: "cropper"; + rel2.relative: 0.0 1.0; + } + } + part { name: "shader_bottom"; + type: RECT; + scale: 1; + mouse_events: 0; + clip_to: "clipper"; + description { state: "default" 0.0; + color: 0 0 0 200; + rel1.to: "shader_left"; + rel1.relative: 0.0 1.0; + rel2.to: "clipper"; + rel2.relative: 1.0 1.0; + } + } + part { name: "shader_right"; + type: RECT; + scale: 1; + mouse_events: 0; + clip_to: "clipper"; + description { state: "default" 0.0; + color: 0 0 0 200; + rel1.to: "shader_top"; + rel1.relative: 1.0 0.0; + rel2.to: "shader_bottom"; + rel2.relative: 1.0 0.0; + } + } + part { name: "cropper"; + type: RECT; + scale: 1; + mouse_events: 0; + clip_to: "clipper"; + description { state: "default" 0.0; + color: 255 255 255 0; + rel1.to: "rel1_dragable"; + rel2.to: "rel2_dragable"; + } + } + part { name: "rel1_dragable"; + type: RECT; + scale: 1; + mouse_events: 1; + clip_to: "clipper"; + description { state: "default" 0.0; + color: 0 0 0 255; + min: 16 16; + max: 16 16; + } + dragable { + confine: "ephoto.swallow.image"; + x: 1 1 0; + y: 1 1 0; + } + } + part { name: "rel2_dragable"; + type: RECT; + scale: 1; + mouse_events: 1; + clip_to: "clipper"; + description { state: "default" 0.0; + color: 0 0 0 255; + min: 16 16; + max: 16 16; + } + dragable { + confine: "ephoto.swallow.image"; + x: 1 1 0; + y: 1 1 0; + } + } + } + programs { + program { name: "on_load_init"; + signal: "load"; + source: ""; + after: "on_load_show"; + script { + set_drag(PART:"rel1_dragable", 0.2, 0.2); + set_drag(PART:"rel2_dragable", 0.8, 0.8); + } + } + program { name: "on_load_show"; + action: STATE_SET "show" 0.0; + target: "clipper"; + transition: DECELERATE 0.25; + after: "emit_drag_signal"; + } + program { name: "emit_drag_signal"; + action: SIGNAL_EMIT "drag" "rel2_dragable"; + } + } +} + --