neo1973-germany/epydial/data/themes/dialer_main.edc
Abraxa efe7084165 Rename dialer main screen theme file
Add "in call" screen theme file
Rework TestView and EdjeGroup classes to allow the use of multiple edje groups and corresponding theme files
Add compile_theme script, making use of easy_e17
Fix bug in EdjeGroup.__init__() that made use of newly renamed variable f



git-svn-id: http://www.neo1973-germany.de/svn@107 46df4e5c-bc4e-4628-a0fc-830ba316316d
2008-08-31 02:00:48 +00:00

387 lines
8.9 KiB
Text

// dialer.edc
// this is a theme for epydial, a pyneo dialer
//
// TODO: make the font colors shinier :)
//
// Signal1: "dialer_send"
// Parameter1.1: $"keynumber"
// Parameter1.2: "backspace"
// Parameter1.2: "dial"
data {
item: "author" "thomasg [thomas (a) gstaedtner (.) net]";
item: "version" "prototype";
item: "name" "epydial_default";
}
color_classes {
color_class {
name: "button_inactive";
color: 255 255 255 255;
color2: 25 215 0 255;
color3: 25 215 0 255;
}
color_class {
name: "button_active";
color: 0 0 0 255;
color2: 0 0 0 255;
color3: 0 0 0 255;
}
}
spectra {
spectrum {
name: "background";
color: 80 80 80 255 1;
color: 210 210 210 255 1;
}
spectrum {
name: "button";
color: 5 5 5 255 1;
color: 110 110 110 255 1;
color: 10 10 10 255 1;
}
spectrum {
name: "button_active";
color: 15 170 0 255 1;
color: 130 255 0 255 1;
color: 20 200 0 255 1;
}
}
#define BUTTON(button_number, rel1x, rel1y, rel2x, rel2y, button_caption) \
part { \
name: "button_"button_number; \
type: GRADIENT; \
description { \
state: "default" 0; \
gradient { \
spectrum: "button"; \
rel1 { relative: 0 0; offset: 0 0; }; \
rel2 { relative: 0 0.75; offset: 0 0; }; \
} \
fill { \
spread: 1; \
angle: 1; \
size { relative: 1 0; offset: 0 0; }; \
} \
rel1 { relative: rel1x rel1y; offset: 0 0; }; \
rel2 { relative: rel2x rel2y; offset: 0 0; }; \
} \
description { \
state: "default" 0.5; \
inherit: "default" 0; \
gradient.spectrum: "button_active"; \
rel1.offset: 0 -5; \
rel2.offset: 0 5; \
} \
description { \
state: "default" 1; \
inherit: "default" 0; \
} \
} \
part { \
name: "button_accent_"button_number; \
type: RECT; \
description { \
state: "default" 0; \
color: 25 215 0 255; \
rel1 { \
to: "button_"button_number; \
relative: 0 0.95; \
} \
rel2.to: "button_"button_number; \
} \
} \
part { \
name: "button_"button_number"_caption"; \
type: TEXT; \
mouse_events: 0; \
effect: GLOW; \
description { \
state: "default" 0; \
color_class: "button_inactive"; \
rel1 { \
to: "button_"button_number; \
relative: 0 0; \
} \
rel2 { \
to: "button_"button_number; \
relative: 1 1; \
} \
text { \
text: button_caption; \
size: 18; \
font: "Sans:style=Bold,Edje-Vera"; \
fit: 1 1; \
} \
} \
} \
program { \
name: "button_"button_number"_signal_emit"; \
signal: "mouse,down,*"; \
source: "button_"button_number; \
action: SIGNAL_EMIT "dialer_send" button_caption; \
} \
program { \
name: "button_"button_number"_animation"; \
signal: "mouse,down,*"; \
source: "button_"button_number; \
action: STATE_SET "default" 0.5; \
target: "button_"button_number; \
} \
program { \
name: "button_"button_number"_animation_end"; \
signal: "mouse,up,*"; \
source: "button_"button_number; \
action: STATE_SET "default" 1; \
target: "button_"button_number; \
transition: DECELERATE 0.1; \
}
#define DESIGN_STRIPE(stripe_number, rel1x, rel1y, rel2x, rel2y) \
part { \
name: "design_stripe_"stripe_number; \
type: RECT; \
description { \
state: "default" 0; \
color: 0 0 0 255; \
rel1 { relative: rel1x rel1y; offset: 0 0; }; \
rel2 { relative: rel2x rel2y; offset: 0 0; }; \
} \
}
#define DESIGN_SEPERATOR(seperator_number, rel1x, rel1y, rel2x, rel2y) \
part { \
name: "design_seperator_"seperator_number; \
type: RECT; \
description { \
state: "defeault" 0; \
color: 255 255 255 100; \
rel1 { relative: rel1x rel1y; offset: -0.5 7; }; \
rel2 { relative: rel2x rel2y; offset: 0.5 -9; }; \
} \
}
collections {
group {
name: "pyneo/dialer/main";
min: 100 100;
max: 800 800;
parts {
part {
name: "background";
type: GRADIENT;
description {
state: "default" 0;
gradient {
spectrum: "background";
rel1 { relative: 0 0; offset: 0 0; };
rel2 { relative: 0 1; offset: 0 0; };
}
fill {
spread: 1;
angle: 1;
size { relative: 1 0; offset: 0 0; };
}
rel1 { relative: 0 0; offset: 0 0; };
rel2 { relative: 1 1; offset: 0 0; };
}
}
/* stripes - just for design :) */
DESIGN_STRIPE(1, 1/2, 0.18, 1, 0.18);
DESIGN_STRIPE(2, 1/2, 0.22, 1, 0.22);
DESIGN_STRIPE(3, 1/2, 0.26, 1, 0.26);
part {
name: "numberdisplay_background";
type: RECT;
description {
state: "default" 0;
color: 0 0 0 255;
rel1 { relative: 0.02 0.02; offset: 0 0; };
rel2 { relative: 0.9 0.3; offset: 0 0; };
}
}
part {
name: "numberdisplay_foreground";
type: RECT;
description {
state: "default" 0;
color: 255 255 255 255;
rel1 {
to: "numberdisplay_background";
offset: 2 2;
}
rel2 {
to: "numberdisplay_background";
offset: -7 -7;
}
}
description {
state: "default" 0.5;
inherit: "default" 0;
color: 150 255 60 255;
rel1.offset: -10 -10;
rel2.offset: 10 10;
}
description {
state: "default" 1;
inherit: "default" 0;
}
}
program {
name: "numberdisplay_forground_signal_emit";
signal: "mouse,down,*";
source: "numberdisplay_foreground";
action: SIGNAL_EMIT "dialer_send" "dial";
}
program {
name: "numberdisplay_foreground_animation";
signal: "mouse,down,*";
source: "numberdisplay_foreground";
action: STATE_SET "default" 0.5;
target: "numberdisplay_foreground";
transition: LINEAR 0.25;
}
program {
name: "numberdisplay_foreground_animation_end";
signal: "mouse,up,*";
source: "numberdisplay_foreground";
action: STATE_SET "default" 1;;
target: "numberdisplay_foreground";
transition: LINEAR 0.25;
}
part {
name: "numberdisplay_text";
type: TEXT;
mouse_events: 0;
effect: OUTLINE_SOFT_SHADOW;
description {
state: "default" 0;
color_class: "button_inactive";
rel1 {
to: "numberdisplay_foreground";
relative: 0.02 0;
}
rel2 {
to: "numberdisplay_foreground";
relative: 0.75 1;
}
text {
text: "testmode";
size: 28;
font: "Sans:style=Bold,Edje-Vera";
fit: 0 0;
}
}
}
part {
name: "numberdisplay_backspace";
type: TEXT;
mouse_events: 0;
effect: GLOW;
description {
state: "default" 0;
color_class: "button_inactive";
rel1 {
to: "numberdisplay_foreground";
relative: 0.77 0;
}
rel2 {
to: "numberdisplay_foreground";
relative: 1 1;
}
text {
text: "<";
size: 18;
font: "Sans:style=Bold,Edje-Vera";
fit: 1 1;
}
}
}
part {
name: "numberdisplay_backspace_area";
type: RECT;
description {
state: "default" 0;
color: 0 0 0 0;
rel1 { relative: 2/3 0; offset: 0 0; };
rel2 { relative: 3/3 22/70; offset: 0 0; };
}
description {
state: "default" 0.3;
rel1.to: "numberdisplay_foreground";
rel2.to: "numberdisplay_foreground";
}
description {
state: "default" 0.6;
inherit: "default" 0.3;
color: 255 0 0 100;
}
description {
state: "default" 1;
inherit: "default" 0;
}
}
program {
name: "numberdisplay_backspace_area_signal_emit";
signal: "mouse,down,*";
source: "numberdisplay_backspace_area";
action: SIGNAL_EMIT "dialer_send" "backspace";
}
program {
name: "numberdisplay_backspace_area_animation_start";
signal: "mouse,down,*";
source: "numberdisplay_backspace_area";
action: STATE_SET "default" 0.3;
target: "numberdisplay_backspace_area";
transition: LINEAR 0;
after: "numberdisplay_backspace_area_animation_continue";
}
program {
name: "numberdisplay_backspace_area_animation_continue";
action: STATE_SET "default" 0.6;
target: "numberdisplay_backspace_area";
transition: LINEAR 0.3;
after: "numberdisplay_backspace_area_animation_stop";
}
program {
name: "numberdisplay_backspace_area_animation_stop";
action: STATE_SET "default" 1;
target: "numberdisplay_backspace_area";
transition: LINEAR 0;
}
/* row 1 */
BUTTON(1, 0, 25/70, 1/3, 35/70, 1);
BUTTON(2, 1/3, 25/70, 2/3, 35/70, 2);
BUTTON(3, 2/3, 25/70, 3/3, 35/70, 3);
DESIGN_SEPERATOR(1, 1/3, 25/70, 1/3, 35/70);
DESIGN_SEPERATOR(2, 2/3, 25/70, 2/3, 35/70);
/* row 2 */
BUTTON(4, 0, 36/70, 1/3, 46/70, 4);
BUTTON(5, 1/3, 36/70, 2/3, 46/70, 5);
BUTTON(6, 2/3, 36/70, 3/3, 46/70, 6);
DESIGN_SEPERATOR(4, 1/3, 36/70, 1/3, 46/70);
DESIGN_SEPERATOR(5, 2/3, 36/70, 2/3, 46/70);
/* row 3 */
BUTTON(7, 0, 47/70, 1/3, 57/70, 7);
BUTTON(8, 1/3, 47/70, 2/3, 57/70, 8);
BUTTON(9, 2/3, 47/70, 3/3, 57/70, 9);
DESIGN_SEPERATOR(7, 1/3, 47/70, 1/3, 57/70);
DESIGN_SEPERATOR(8, 2/3, 47/70, 2/3, 57/70);
/* row 4 */
BUTTON(10, 0, 58/70 , 1/3, 68/70, "*");
BUTTON(11, 1/3, 58/70, 2/3, 68/70, 0);
BUTTON(12, 2/3, 58/70, 3/3, 68/70, "#");
DESIGN_SEPERATOR(10, 1/3, 58/70, 1/3, 68/70);
DESIGN_SEPERATOR(11, 2/3, 58/70, 2/3, 68/70);
}
}
}