Skip to content

Instantly share code, notes, and snippets.

@borisfaure
Created July 29, 2020 10:03
Show Gist options
  • Save borisfaure/846efacc0fa64e9f66a1e536e14d63eb to your computer and use it in GitHub Desktop.
Save borisfaure/846efacc0fa64e9f66a1e536e14d63eb to your computer and use it in GitHub Desktop.
EDC example to produce text with background and border as rectangles
/* edje_cc txt.edc && edje_player txt.edj */
collections {
group { name: "base";
parts {
part { name: "bg"; type: RECT;
description { state: "default" 0.0;
color: 247 240 215 255;
}
}
part { name: "base"; type: RECT;
scale: 1;
description { state: "default" 0.0;
visible: 0;
fixed: 1 1;
/* lower right corner */
rel1 {
relative: 0.5. 0.5;
}
rel2 {
relative: 1.0 1.0;
}
}
}
part { name: "border"; type: RECT;
scale: 1;
description { state: "default" 0.0;
rel1 {
to: "back";
/* larger border to make it visible */
offset: -10 -10;
}
rel2 {
to: "back";
offset: 10 10;
}
color: 166 194 205 255;
}
}
part { name: "back"; type: RECT;
scale: 1;
description { state: "default" 0.0;
rel1 {
to: "txt";
}
rel2 {
to: "txt";
}
color: 182 179 72 255;
}
}
part { name: "txt"; type: TEXT;
scale: 1;
effect: GLOW;
description { state: "default" 0.0;
fixed: 1 1;
rel1 {
to: "base";
relative: 0.5 0.5;
}
rel2 {
to: "base";
relative: 0.5 0.5;
}
color: 224 96 80 255;
color2: 224 96 80 24;
color3: 224 96 80 8;
text {
font: "Sans"; size: 12;
text: "MY TEXT ☺";
min: 1 1;
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment