An example of layout theme file

- Main Page
- Related Pages
- Modules
- Data Structures
- Files
- Examples

An example of layout theme file

This theme file contains two groups.

Each of them is a different theme, and can be used by an Elementary Layout widget. A theme can be used more than once by many different Elementary Layout widgets too.

collections {
group {
name: "example/mylayout";
data {
item: "title" "Layout Example 01";
}
parts {
part {
name: "example/title";
type: TEXT;
description {
state: "default" 0.0;
color: 0 0 0 255;
rel1 {
relative: 0.0 0.0;
offset: 0 0;
}
rel2 {
relative: 1.0 0.2;
offset: -1 -1;
}
text {
text: "bla";
size: 16;
font: "sans";
min: 1 1;
ellipsis: -1;
}
}
}
part {
name: "example/custom";
type: SWALLOW;
description {
state: "default" 0.0;
fixed: 1 1;
rel1 {
relative: 0.25 0.8;
offset: 0 0;
}
rel2 {
relative: 0.75 0.9;
offset: -1 -1;
}
}
} // example/custom
part {
name: "example/box";
type: BOX;
description {
state: "default" 0.0;
box {
layout: "horizontal_flow";
padding: 2 2;
align: 0.5 0.5;
min: 1 1;
}
rel1 {
relative: 0.0 0.2;
offset: 0 0;
}
rel2 {
relative: 1.0 0.5;
offset: -1 -1;
}
}
} // example/box
part {
name: "example/table";
type: TABLE;
description {
state: "default" 0.0;
table {
homogeneous: NONE;
padding: 2 2;
align: 0.5 0.5;
min: 1 1;
}
rel1 {
relative: 0.0 0.5;
offset: 0 0;
}
rel2 {
relative: 1.0 0.7;
offset: -1 -1;
}
}
} // example/table
}
}
group {
name: "example/mylayout3";
data {
item: "title" "Layout Example 03";
}
parts {
part {
name: "example/title";
type: TEXT;
description {
state: "default" 0.0;
color: 0 0 0 255;
rel1 {
relative: 0.0 0.0;
offset: 0 0;
}
rel2 {
relative: 1.0 0.2;
offset: -1 -1;
}
text {
text: "bla";
size: 16;
font: "sans";
min: 1 1;
ellipsis: -1;
}
}
}
part {
name: "example/custom";
type: SWALLOW;
description {
state: "default" 0.0;
min: 160 50;
max: 160 50;
align: 0.5 1.0;
}
description {
state: "big" 0.0;
inherit: "default" 0.0;
min: 320 100;
max: 320 100;
}
} // example/custom
programs {
program {
name: "swallow,grow";
signal: "button,enlarge";
action: STATE_SET "big" 0.0;
transition: LINEAR 0.5;
target: "example/custom";
after: "emit,changed";
}
program {
name: "swallow,shrink";
signal: "button,reduce";
action: STATE_SET "default" 0.0;
transition: LINEAR 0.5;
target: "example/custom";
after: "emit,changed";
}
program {
name: "emit,changed";
action: SIGNAL_EMIT "size,changed" "";
}
}
}
}
}