forked from enlightenment/enlightenment
working on clock calendar. not done. just progress.
SVN revision: 59943
This commit is contained in:
parent
e4a94c3888
commit
85283b49d5
|
@ -12179,69 +12179,187 @@ collections {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
group {
|
group { name: "e/modules/clock/calendar/dayname";
|
||||||
name: "e/modules/clock/calendar";
|
|
||||||
parts {
|
parts {
|
||||||
|
part { name: "day"; type: RECT;
|
||||||
|
mouse_events: 0;
|
||||||
|
description { state: "default" 0.0;
|
||||||
|
color: 255 255 0 128;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part { name: "e.text.label";
|
||||||
|
type: TEXT;
|
||||||
|
mouse_events: 0;
|
||||||
|
description { state: "default" 0.0;
|
||||||
|
fixed: 0 1;
|
||||||
|
align: 0.5 0.5;
|
||||||
|
rel1 {
|
||||||
|
relative: 0.0 0.0;
|
||||||
|
offset: 1 1;
|
||||||
|
}
|
||||||
|
rel2 {
|
||||||
|
relative: 1.0 1.0;
|
||||||
|
offset: -2 -2;
|
||||||
|
}
|
||||||
|
color: 0 0 0 255;
|
||||||
|
text {
|
||||||
|
text: "XXXabcde";
|
||||||
|
font: "Sans";
|
||||||
|
align: 0.5 0.5;
|
||||||
|
ellipsis: 0.0;
|
||||||
|
size: 8;
|
||||||
|
min: 0 1;
|
||||||
|
text_class: "module_small";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
group { name: "e/modules/clock/calendar/day";
|
||||||
|
parts {
|
||||||
|
part { name: "day"; type: RECT;
|
||||||
|
mouse_events: 0;
|
||||||
|
description { state: "default" 0.0;
|
||||||
|
color: 0 0 255 128;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part { name: "e.text.label";
|
||||||
|
type: TEXT;
|
||||||
|
effect: SOFT_SHADOW;
|
||||||
|
mouse_events: 0;
|
||||||
|
description { state: "default" 0.0;
|
||||||
|
fixed: 1 1;
|
||||||
|
align: 0.5 0.5;
|
||||||
|
rel1 {
|
||||||
|
relative: 0.0 0.0;
|
||||||
|
offset: 1 1;
|
||||||
|
}
|
||||||
|
rel2 {
|
||||||
|
relative: 1.0 1.0;
|
||||||
|
offset: -2 -2;
|
||||||
|
}
|
||||||
|
color: 255 255 255 255;
|
||||||
|
color3: 0 0 0 32;
|
||||||
|
text {
|
||||||
|
text: "XX";
|
||||||
|
font: "Sans:style=Bold";
|
||||||
|
align: 0.5 0.5;
|
||||||
|
size: 10;
|
||||||
|
min: 1 1;
|
||||||
|
text_class: "module_normal";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
group { name: "e/modules/clock/calendar";
|
||||||
|
parts {
|
||||||
|
part { name: "names"; type: RECT;
|
||||||
|
mouse_events: 0;
|
||||||
|
description { state: "default" 0.0;
|
||||||
|
color: 0 255 0 128;
|
||||||
|
rel1.relative: 0.0 0.10;
|
||||||
|
rel2.relative: 1.0 0.25;
|
||||||
|
step: 7 5;
|
||||||
|
}
|
||||||
|
}
|
||||||
part { name: "cal"; type: RECT;
|
part { name: "cal"; type: RECT;
|
||||||
mouse_events: 0;
|
mouse_events: 0;
|
||||||
description { state: "default" 0.0;
|
description { state: "default" 0.0;
|
||||||
color: 255 0 0 128;
|
color: 255 0 0 128;
|
||||||
rel1.relative: 0.0 0.20;
|
rel1.to_y: "names";
|
||||||
|
rel1.relative: 0.0 1.0;
|
||||||
|
step: 7 5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 7x5 grid
|
part { name: "e.table.daynames"; type: TABLE;
|
||||||
#define CALDAY(x, y) \
|
description { state: "default" 0.0;
|
||||||
part { name: "d"#x.#y; type: RECT; \
|
rel1.to: "names";
|
||||||
mouse_events: 0; \
|
rel2.to: "names";
|
||||||
description { state: "default" 0.0; \
|
table {
|
||||||
color: 0 255 0 128; \
|
homogeneous: TABLE;
|
||||||
rel1.relative: ((x+0)/7) ((y+0)/5); \
|
padding: 1 1;
|
||||||
rel1.to: "cal"; \
|
align: 0.5 0.5;
|
||||||
rel1.offset: 1 1; \
|
|
||||||
rel2.relative: ((x+1)/7) ((y+1)/5); \
|
|
||||||
rel2.offset: -2 -2; \
|
|
||||||
rel2.to: "cal"; \
|
|
||||||
} \
|
|
||||||
}
|
}
|
||||||
CALDAY(0, 0)
|
}
|
||||||
CALDAY(1, 0)
|
table { items {
|
||||||
CALDAY(2, 0)
|
#define DAYNAME(x) \
|
||||||
CALDAY(3, 0)
|
item { \
|
||||||
CALDAY(4, 0)
|
position: x 0; \
|
||||||
CALDAY(5, 0)
|
span: 1 1; \
|
||||||
CALDAY(6, 0)
|
source: "e/modules/clock/calendar/dayname"; \
|
||||||
|
weight: 1.0 1.0; \
|
||||||
|
align: -1.0 -1.0; \
|
||||||
|
}
|
||||||
|
DAYNAME(0);
|
||||||
|
DAYNAME(1);
|
||||||
|
DAYNAME(2);
|
||||||
|
DAYNAME(3);
|
||||||
|
DAYNAME(4);
|
||||||
|
DAYNAME(5);
|
||||||
|
DAYNAME(6);
|
||||||
|
} }
|
||||||
|
}
|
||||||
|
part { name: "e.table.days"; type: TABLE;
|
||||||
|
description { state: "default" 0.0;
|
||||||
|
rel1.to: "cal";
|
||||||
|
rel2.to: "cal";
|
||||||
|
table {
|
||||||
|
homogeneous: TABLE;
|
||||||
|
padding: 1 1;
|
||||||
|
align: 0.5 0.5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
table { items {
|
||||||
|
#define DAY(x, y) \
|
||||||
|
item { \
|
||||||
|
position: x y; \
|
||||||
|
span: 1 1; \
|
||||||
|
source: "e/modules/clock/calendar/day"; \
|
||||||
|
weight: 1.0 1.0; \
|
||||||
|
align: -1.0 -1.0; \
|
||||||
|
}
|
||||||
|
DAY(0, 0);
|
||||||
|
DAY(1, 0);
|
||||||
|
DAY(2, 0);
|
||||||
|
DAY(3, 0);
|
||||||
|
DAY(4, 0);
|
||||||
|
DAY(5, 0);
|
||||||
|
DAY(6, 0);
|
||||||
|
|
||||||
CALDAY(0, 1)
|
DAY(0, 1);
|
||||||
CALDAY(1, 1)
|
DAY(1, 1);
|
||||||
CALDAY(2, 1)
|
DAY(2, 1);
|
||||||
CALDAY(3, 1)
|
DAY(3, 1);
|
||||||
CALDAY(4, 1)
|
DAY(4, 1);
|
||||||
CALDAY(5, 1)
|
DAY(5, 1);
|
||||||
CALDAY(6, 1)
|
DAY(6, 1);
|
||||||
|
|
||||||
CALDAY(0, 2)
|
DAY(0, 2);
|
||||||
CALDAY(1, 2)
|
DAY(1, 2);
|
||||||
CALDAY(2, 2)
|
DAY(2, 2);
|
||||||
CALDAY(3, 2)
|
DAY(3, 2);
|
||||||
CALDAY(4, 2)
|
DAY(4, 2);
|
||||||
CALDAY(5, 2)
|
DAY(5, 2);
|
||||||
CALDAY(6, 2)
|
DAY(6, 2);
|
||||||
|
|
||||||
CALDAY(0, 3)
|
DAY(0, 3);
|
||||||
CALDAY(1, 3)
|
DAY(1, 3);
|
||||||
CALDAY(2, 3)
|
DAY(2, 3);
|
||||||
CALDAY(3, 3)
|
DAY(3, 3);
|
||||||
CALDAY(4, 3)
|
DAY(4, 3);
|
||||||
CALDAY(5, 3)
|
DAY(5, 3);
|
||||||
CALDAY(6, 3)
|
DAY(6, 3);
|
||||||
|
|
||||||
CALDAY(0, 4)
|
DAY(0, 4);
|
||||||
CALDAY(1, 4)
|
DAY(1, 4);
|
||||||
CALDAY(2, 4)
|
DAY(2, 4);
|
||||||
CALDAY(3, 4)
|
DAY(3, 4);
|
||||||
CALDAY(4, 4)
|
DAY(4, 4);
|
||||||
CALDAY(5, 4)
|
DAY(5, 4);
|
||||||
CALDAY(6, 4)
|
DAY(6, 4);
|
||||||
|
} }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ static void
|
||||||
_clock_popup_new(Instance *inst)
|
_clock_popup_new(Instance *inst)
|
||||||
{
|
{
|
||||||
Evas *evas;
|
Evas *evas;
|
||||||
Evas_Object *o, *oi;
|
Evas_Object *o, *oi, *od;
|
||||||
|
|
||||||
if (inst->popup) return;
|
if (inst->popup) return;
|
||||||
inst->popup = e_gadcon_popup_new(inst->gcc);
|
inst->popup = e_gadcon_popup_new(inst->gcc);
|
||||||
|
@ -50,10 +50,29 @@ _clock_popup_new(Instance *inst)
|
||||||
"e/modules/clock/main");
|
"e/modules/clock/main");
|
||||||
o = e_widget_image_add_from_object(evas, oi, 128, 128);
|
o = e_widget_image_add_from_object(evas, oi, 128, 128);
|
||||||
evas_object_show(oi);
|
evas_object_show(oi);
|
||||||
|
|
||||||
e_widget_table_object_align_append(inst->o_table, o,
|
e_widget_table_object_align_append(inst->o_table, o,
|
||||||
0, 0, 1, 1, 0, 0, 0, 0, 0.5, 0.5);
|
0, 0, 1, 1, 0, 0, 0, 0, 0.5, 0.5);
|
||||||
|
|
||||||
|
oi = edje_object_add(evas);
|
||||||
|
inst->o_popclock = oi;
|
||||||
|
e_theme_edje_object_set(oi, "base/theme/modules/clock",
|
||||||
|
"e/modules/clock/calendar");
|
||||||
|
// FIXME: set text part for month name and year
|
||||||
|
// FIXME: hook signal callbacks for next and prev month
|
||||||
|
|
||||||
|
// FIXME: set up day names (mon, tue, wed, ... sat, sun)
|
||||||
|
|
||||||
|
// FIXME: calendar has a 7x5 grid, set up all the cells to ve either
|
||||||
|
// hidden, visible, be weekend or weekday and have right date, be
|
||||||
|
// neighbouring month, be "active" today)
|
||||||
|
od = edje_object_part_table_child_get(oi, "e.table.days", 0, 0);
|
||||||
|
edje_object_part_text_set(od, "e.text.label", "0");
|
||||||
|
|
||||||
|
o = e_widget_image_add_from_object(evas, oi, 182, 128);
|
||||||
|
evas_object_show(oi);
|
||||||
|
e_widget_table_object_align_append(inst->o_table, o,
|
||||||
|
1, 0, 1, 1, 0, 0, 0, 0, 0.5, 0.5);
|
||||||
|
|
||||||
e_gadcon_popup_content_set(inst->popup, inst->o_table);
|
e_gadcon_popup_content_set(inst->popup, inst->o_table);
|
||||||
e_gadcon_popup_show(inst->popup);
|
e_gadcon_popup_show(inst->popup);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue