summaryrefslogtreecommitdiff
path: root/data/elementary/themes/edc/notification.edc
blob: 63a401b1d3e43a8f562faf3efc1527c92fa5ae78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
group { name: "e/modules/notification/logo";
   images.image: "glow_exclam.png" COMP;
   parts {
      part { name: "base"; mouse_events: 0;
         description { state: "default" 0.0;
            image.normal: "glow_exclam.png";
            max: 48 48;
            aspect: 1.0 1.0;
         }
      }
   }
}

group { name: "notification/main";
   alias: "e/modules/notification/main";
   images.image: "darken_square.png" COMP;
   images.image: "sym_close_light_normal.png" COMP;
   images.image: "sym_close_light_selected.png" COMP;
   data.item: "app_icon_max" "48 48";
   data.item: "shaped" "1";
   styles {   
      style { name: "notification_style_nowrap";
         base: "font="FN" font_size=10 align=left color=#ffff style=shadow,bottom shadow_color=#00000080 wrap=none text_class=notification_body";
         tag:  "subject"  "+ text_class=module_large style=glow color=#3399ffff glow_color=#3399ff18 align=center glow2_color=#3399ff12";
         tag:  "body"  "+ text_class=module_normal";
         tag:  "br" "\n";
         tag:  "ps" "ps";
         tag:  "b" "+ font="FNBD" text_class=module_bold";
         tag:  "i" "+ font="FNIT" text_class=module_italic";
         tag:  "u" "+ underline=on underline_color=#3399ffff";
         tag:  "img" ""; // images not supported
         tag:  "a" ""; // links not supported
      }
      style { name: "notification_style";
         base: "font="FN" font_size=10 align=left color=#ffff style=shadow,bottom shadow_color=#00000080 wrap=word text_class=notification_body";
         tag:  "subject"  "+ text_class=module_large style=glow color=#3399ffff glow_color=#3399ff18 align=center glow2_color=#3399ff12";
         tag:  "body"  "+ text_class=module_normal";
         tag:  "br" "\n";
         tag:  "ps" "ps";
         tag:  "b" "+ font="FNBD" text_class=module_bold";
         tag:  "i" "+ font="FNIT" text_class=module_italic";
         tag:  "u" "+ underline=on underline_color=#3399ffff";
         tag:  "img" ""; // images not supported
         tag:  "a" ""; // links not supported
      }
   }
   
   parts {
      alias: "e.event.close" "notification.event.close";
      part { name: "base";
         description { state: "default" 0.0;
            image.normal: "darken_square.png";
            image.border: 6 6 6 6;
         }
      }
      part { name: "titleclip"; type: RECT;
         description { state: "default" 0.0;
            rel2.to_x: "e.event.close";
            rel2.relative: 0.0 1.0;
         }
      }
      part { name: "bodyclip"; type: RECT;
         description { state: "default" 0.0;
            rel2.offset: -13 -13;
            min: 220 80;
         }
      }
      part { name: "notification.swallow.app_icon"; type: SWALLOW; mouse_events: 0;
         description { state: "default" 0.0;
            align: 0.0 0.5;
            aspect: 1.0 1.0;
            aspect_preference: BOTH;
            rel1.offset: 12 12;
            rel2.offset: 12 -13;
            rel2.relative: 0.0 1.0;
            min: 24 24;
            fixed: 1 1;
         }
      }
      part { name: "notification.textblock.message"; type: TEXTBLOCK; mouse_events: 0;
         clip_to: "bodyclip";
         scale;
         description { state: "default" 0.0;
            align: 0.0 0.0;
            min: 260 40;
            rel1.to_x: "notification.swallow.app_icon";
            rel1.to_y: "notification.text.title";
            rel1.relative: 1.0 1.0;
            rel1.offset: 4 4;
            rel2.offset: -27 -11;
            text { style: "notification_style";
               min: 0 1;
            }
         }
      }
      part { name: "notification.text.title"; type: TEXT; mouse_events: 0;
         clip_to: "titleclip";
         effect: SHADOW BOTTOM;
         scale: 1;
         description { state: "default" 0.0;
            rel1.to_x: "notification.swallow.app_icon";
            rel1.relative: 1.0 0.0;
            rel1.offset: 4 12;
            rel2.relative: 0.0 0.0;
            rel2.to_x: "e.event.close";
            rel2.offset: -5 12;
            color: FN_COL_DEFAULT;
            align: 0.0 0.0;
            color_class: "notification_title";
            text { font: FNBD; size: 10;
               text: "title goes here blah blah";
               min: 0 1;
               align: 0.0 0.5;
               text_class: "notification_title";
            }
            fixed: 0 1;
         }
      }
      part { name: "close";
         description { state: "default" 0.0;
            image.normal: "sym_close_light_normal.png";
            rel1.to: "e.event.close";
            rel2.to: "e.event.close";
            min: 15 15;
            max: 15 15;
            fixed: 1 1;
         }
         description { state: "selected" 0.0;
            inherit: "default" 0.0;
            image.normal: "sym_close_light_selected.png";
         }
      }
      part { name: "notification.event.close"; type: RECT;
         scale: 1;
         description { state: "default" 0.0;
            rel1.relative: 1.0 0.0;
            rel1.offset: -13 12;
            rel2.relative: 1.0 0.0;
            rel2.offset: -13 12;
            align: 1.0 0.0;
            min: 15 15;
            color: 0 0 0 0;
            fixed: 1 1;
         }
      }
   }
   programs {
      program {
         signal: "mouse,down,1"; source: "e.event.close";
         action: STATE_SET "selected" 0.0;
         target: "close";
      }
      program {
         signal: "mouse,up,1"; source: "e.event.close";
         action: STATE_SET "default" 0.0;
         target: "close";
      }
      program {
         signal: "mouse,clicked,1"; source: "e.event.close";
         action: SIGNAL_EMIT "notification,close" "theme";
      }
      program {
         signal: "mouse,clicked,1"; source: "base";
         action: SIGNAL_EMIT "notification,find" "theme";
      }
//      program {
//         signal: "notification,new"; source: "notification";
//      }
//      program {
//         signal: "notification,del"; source: "notification";
//      }
//      program {
//         signal: "notification,deleted"; source: "notification";
//      }
   }
}