[Telegram] Display the text to label instead of entry
[apps/native/telegram-tizen.git] / TelegramTizen / res / edje / telegram_theme.edc
1
2 /* 
3     This file is part of Telegram application for tizen
4
5     This library is free software; you can redistribute it and/or
6     modify it under the terms of the GNU Lesser General Public
7     License as published by the Free Software Foundation; either
8     version 2.1 of the License, or (at your option) any later version.
9
10     This library is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13     Lesser General Public License for more details.
14
15     You should have received a copy of the GNU Lesser General Public
16     License along with this library; if not, write to the Free Software
17     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
18 */
19
20
21 collections
22 {
23         /* This is EFL-oriented features */
24         base_scale: 2.6;
25
26         images {
27                 image: "telegram_bubble_bg_receive_ef.#.png" COMP;
28                 image: "telegram_bubble_bg_receive.#.png" COMP;
29                 image: "telegram_bubble_bg_send_ef.#.png" COMP;
30                 image: "telegram_bubble_bg_send.#.png" COMP;
31                 image: "ic_message_read.png" COMP;
32         }
33
34 styles {
35    style {
36       name: "entry_bubble_single_textblock_style";
37       base: "font=Tizen:style=Regular font_size=36 color=#FAFAFA color_class=ATO014 align=left";
38    }
39    style {
40       name: "entry_bubble_multi_textblock_style";
41       base: "font=Tizen:style=Regular font_size=36 color=#FAFAFA color_class=ATO014 wrap=mixed align=left";
42    }
43 }
44
45         group { name: "elm/entry/base-single-noedit/readmessage1";
46                 script {
47               public multilined = 0;
48         
49               public check_multiline() {
50                  new x, y, w, h;
51                  new xx, yy, ww, hh;
52         
53                  get_geometry(PART:"elm.text", x, y, w, h);
54                  get_geometry(PART:"elm.spacer.limit", xx, yy, ww, hh);
55         
56                  if (!get_int(multilined) && ((w >= ww))) {
57                     set_state(PART:"elm.text", "multi", 0.0);
58                     set_state(PART:"elm.text.spacer", "multi", 0.0);
59                     set_int(multilined, 1);
60                  }
61               }
62            }
63                 parts {
64                         part {
65                                 name: "base";
66                                 type: SPACER;
67                                 scale: 1;
68                                 description {
69                                         state: "default" 0.0;
70                                 }
71                         }
72                         part {
73                                 name: "elm.top.pad";
74                                 type: SPACER;
75                                 scale: 1;
76                                 description {
77                                         rel1 { relative: 0.0 0.0; to: "base"; }
78                                         rel2 { relative: 1.0 0.0; to: "base"; }
79                                         min: 0 36;
80                                         align: 0.5 0.0;
81                                         fixed: 1 0;
82                                 }
83                         }
84                         part {
85                                 name: "text,left,pad";
86                                 type: SPACER;
87                                 scale: 1;
88                                 description {
89                                         rel1 { relative: 0.0 0.0; }
90                                         rel2 { relative: 0.0 1.0; }
91                                         min: 72 0;
92                                         align: 0.0 0.5;
93                                         fixed: 1 0;
94                                 }
95                         }
96                         part {
97                                 name: "elm.image.bg.ef";
98                                 type: IMAGE;
99                                 scale: 1;
100                                 description {
101                                         state: "default" 0.0;
102                                         rel1 { relative: 0.0 0.0; to: "elm.text"; offset: -57 -26; }
103                                         rel2 { relative: 1.0 1.0; to: "status_icon"; offset: 40 26; }
104                                         image {
105                                                 normal: "telegram_bubble_bg_receive_ef.#.png";
106                                                 border: 57 40 26 64;
107                                         }
108                                         fixed: 1 1;
109                                 }
110                         }
111                         part {
112                                 name: "elm.image.bg";
113                                 type: IMAGE;
114                                 scale: 1;
115                                 description {
116                                         state: "default" 0.0;
117                                         rel1 { relative: 0.0 0.0; to: "elm.text"; offset: -57 -26; }
118                                         rel2 { relative: 1.0 1.0; to: "status_icon"; offset: 40 26; }
119                                         image {
120                                                 normal: "telegram_bubble_bg_receive.#.png";
121                                                 border: 57 40 26 64;
122                                         }
123                                         color: 106 126 204 225;
124                                         fixed: 1 1;
125                                 }
126                                 description {
127                                         state: "pressed" 0.0;
128                                         inherit: "default" 0.0;
129                                         color:  60 71 115 255;
130                                 }
131                         }
132                         part {
133                                 name: "elm.spacer.limit";
134                                 type: SPACER;
135                                 scale: 1;
136                                 description {
137                                         state: "default" 0.0;
138                                         rel1.relative: 0.5 0.5;
139                                         rel2.relative: 0.5 0.5;
140                                         min: 318 80;
141                                         max: 318 80;
142                                         fixed: 1 1;
143                                 }
144                         }
145                         part {
146                                 name: "elm.text.spacer";
147                                 type: RECT;
148                                 scale: 1;
149                                 description {
150                                         state: "default" 0.0;
151                                         rel1 { relative: 1.0 1.0; to_x: "text,left,pad";  to_y: "elm.top.pad"; }
152                                         rel2 { relative: 1.0 0.0; to: "elm.bottom.pad"; }
153                                         min: 159 0;
154                                         max: 159 0;
155                                         fixed: 1 1;
156                                         align: 0.0 0.5;
157                                 }
158                                 description {
159                                         state: "multi" 0.0;
160                                         inherit: "default" 0.0;
161                                         min: 318 0;
162                                         max: 318 0;
163                                 }
164                         }
165                         part {
166                                 name: "elm.text";
167                                 type: TEXTBLOCK;
168                                 mouse_events: 1;
169                                 entry_mode: PLAIN;
170                                 scale: 1;
171                                 multiline: 1;
172                                 description {
173                                         state: "default" 0.0;
174                                         rel1 { relative: 0.0 1.0; to_x: "elm.text.spacer"; to_y: "elm.top.pad";}
175                                         rel2 { relative: 1.0 0.0; to_x: "elm.text.spacer"; to_y: "elm.bottom.pad"; }
176                                         align: 0.0 0.0;
177                                         fixed: 1 0;
178                                         text {
179                                                 style: "entry_bubble_single_textblock_style";
180                                                 min: 1 1;
181                                                 align: 1.0 0.0;
182                                                 ellipsis: -1;
183                                         }
184                                 }
185                                 description {
186                                         state: "multi" 0.0;
187                                         inherit: "default" 0.0;
188                                         text {
189                                                 style: "entry_bubble_multi_textblock_style";
190                                                 min: 0 1;
191                                                 align: 0.0 0.0;
192                                         }
193                                 }
194                         }
195                         part {
196                                 name: "elm.bubble.rightbottom.pad";
197                                 type: SPACER;
198                                 scale: 1;
199                                 description {
200                                         rel1{
201                                                 to: "elm.text";
202                                                 relative: 1.0 1.0;
203                                         }
204                                         rel2.to: "elm.text";
205                                         align: 0.0 0.0;
206                                         min: 40 64;
207                                         fixed: 1 1;
208                                 }
209                         }
210                         part {
211                                 name: "elm.bottom.pad";
212                                 type: SPACER;
213                                 scale: 1;
214                                 description {
215                                         rel1 { relative: 0.0 1.0; }
216                                         rel2 { relative: 1.0 1.0; }
217                                         align: 0.5 1.0;
218                                         min: 0 74;
219                                         fixed: 0 1;
220                                 }
221                         }
222                         part {
223                                 name: "time";
224                                 type: TEXT;
225                                 mouse_events: 1;
226                                 scale: 1;
227                                 description {
228                         state: "default" 0.0;
229                       rel1 { relative: 0.0 0.0; to: "status_icon"; }
230                       rel2 { relative: 0.0 1.0; to: "status_icon"; }
231                         visible: 1;
232                         align: 1.0 0.5;
233                         min: 0 38;
234                         fixed: 1 1;
235                         color: 250 250 250 255;
236                         text {
237                                 min: 1 1;
238                                 align: 1.0 0.5;
239                                 size: 28;
240                                 ellipsis: -1;
241                                         }
242                                 }
243                         }
244                         part {
245                                 name: "status_icon";
246                                 type: SWALLOW;
247                                 mouse_events: 1;
248                                 scale: 1;
249                                 description {
250                                         state: "default" 0.0;
251                                         rel1 { relative: 0.0 0.0; to: "elm.bubble.rightbottom.pad"; }
252                                         rel2 { relative: 0.0 0.0; to: "elm.bubble.rightbottom.pad"; }
253                                         align: 1.0 0.0;
254                                         min: 0 38;
255                                         fixed: 1 1;
256                                 }
257                                 description {
258                                         state: "status,on";
259                                         inherit: "default" 0.0;
260                                         min: 38 38;
261                                         visible: 1;
262                                 }
263                         }
264                         part {
265                                 name: "event.rect";
266                                 type: RECT;
267                                 repeat_events: 1;
268                                 scale: 1;
269                                 description {
270                                         state: "default" 0.0;
271                                         color: 0 0 0 0;
272                                         rel1.to: "elm.image.bg";
273                                         rel2.to: "elm.image.bg";
274                                 }
275                         }
276                 } // parts
277                 programs {
278                         program {
279                                 name: "focus";
280                                 signal: "load";
281                                 source: "";
282                                 action: FOCUS_SET;
283                                 target: "elm.text";
284                         }
285                         program {
286                                 name: "text_changed";
287                                 signal: "entry,changed";
288                                 source: "*";
289                                 script {
290                                         check_multiline();
291                                 }
292                         }
293                         program {
294                                 name: "resized";
295                                 signal: "resize";
296                                 source: "*";
297                                 script {
298                                         check_multiline();
299                                 }
300                         }
301                         program {
302                                 name: "mouse_down";
303                                 signal: "mouse,down,1";
304                                 source: "event.rect";
305                                 action:  STATE_SET "pressed" 0.0;
306                                 target: "elm.image.bg";
307                         }
308                         program {
309                                 name: "mouse_up";
310                                 signal: "mouse,up,1";
311                                 source: "event.rect";
312                                 action:  STATE_SET "default" 0.0;
313                                 target: "elm.image.bg";
314                         }
315                         program {
316                                 name: "mouse_clicked";
317                                 signal: "mouse,clicked,1";
318                                 source: "event.rect";
319                                 action:  SIGNAL_EMIT "clicked" "item";
320                         }
321                         program {
322                                 name: "status_on";
323                                 signal: "status_on";
324                                 source: "status";
325                                 action:  STATE_SET "status,on" 0.0;
326                                 target: "status_icon";
327                         }
328                         program {
329                                 name: "status_off";
330                                 signal: "status_off";
331                                 source: "status";
332                                 action:  STATE_SET "default" 0.0;
333                                 target: "status_icon";
334                         }
335                 } //programs
336         } //group       
337
338         group { name: "elm/entry/base-single-noedit/sentmessage1";
339                 script {
340               public multilined = 0;
341         
342               public check_multiline() {
343                  new x, y, w, h;
344                  new xx, yy, ww, hh;
345         
346                  get_geometry(PART:"elm.text", x, y, w, h);
347                  get_geometry(PART:"elm.spacer.limit", xx, yy, ww, hh);
348         
349                  if (!get_int(multilined) && ((w >= ww))) {
350                     set_state(PART:"elm.text", "multi", 0.0);
351                     set_state(PART:"elm.text.spacer", "multi", 0.0);
352                     set_int(multilined, 1);
353                  }
354               }
355            }
356                 parts {
357                         part {
358                                 name: "base";
359                                 type: SPACER;
360                                 scale: 1;
361                                 description {
362                                         state: "default" 0.0;
363                                 }
364                         }
365                         part {
366                                 name: "elm.top.pad";
367                                 type: SPACER;
368                                 scale: 1;
369                                 description {
370                                         rel1 { relative: 0.0 0.0; to: "base"; }
371                                         rel2 { relative: 1.0 0.0; to: "base"; }
372                                         min: 0 36;
373                                         align: 0.5 0.0;
374                                         fixed: 0 1;
375                                 }
376                         }
377                         part {
378                                 name: "right,pad";
379                                 type: SPACER;
380                                 scale: 1;
381                                 description {
382                                         rel1 { relative: 1.0 0.0; }
383                                         rel2 { relative: 1.0 1.0; }
384                                         min: 72 0;
385                                         align: 1.0 0.5;
386                                         fixed: 1 0;
387                                 }
388                         }
389                         part {
390                                 name: "elm.bubble.rightbottom.pad";
391                                 type: SPACER;
392                                 scale: 1;
393                                 description {
394                                         rel1{
395                                                 to: "elm.text";
396                                                 relative: 1.0 1.0;
397                                         }
398                                         rel2.to: "elm.text";
399                                         align: 0.0 0.0;
400                                         min: 57 64;
401                                         fixed: 1 1;
402                                 }
403                         }
404                         part {
405                                 name: "elm.bottom.pad";
406                                 type: SPACER;
407                                 scale: 1;
408                                 description {
409                                         rel1 { relative: 0.0 1.0; }
410                                         rel2 { relative: 1.0 1.0; }
411                                         align: 0.5 1.0;
412                                         min: 0 74;
413                                         fixed: 0 1;
414                                 }
415                         }
416                         part {
417                                 name: "elm.image.bg.ef";
418                                 type: IMAGE;
419                                 scale: 1;
420                                 description {
421                                         state: "default" 0.0;
422                                         rel1 { relative: 0.0 0.0; to: "elm.text"; offset: -40 -26; }
423                                         rel2 { relative: 1.0 1.0; to: "status_icon"; offset: 57 26; }
424                                         image {
425                                                 normal: "telegram_bubble_bg_send_ef.#.png";
426                                                 border: 40 57 26 64;
427                                         }
428                                         fixed: 1 1;
429                                 }
430                         }
431                         part {
432                                 name: "elm.image.bg";
433                                 type: IMAGE;
434                                 scale: 1;
435                                 description {
436                                         state: "default" 0.0;
437                                         rel1 { relative: 0.0 0.0; to: "elm.text"; offset: -40 -26; }
438                                         rel2 { relative: 1.0 1.0; to: "status_icon"; offset: 57 26; }
439                                         image {
440                                                 normal: "telegram_bubble_bg_send.#.png";
441                                                 border: 40 57 26 64;
442                                         }
443                                         color: 45 165 224 229;
444                                         fixed: 1 1;
445                                 }
446                                 description {
447                                         state: "pressed" 0.0;
448                                         inherit: "default" 0.0;
449                                         color: 27 99 135 255;
450                                 }
451                         }
452                         part {
453                                 name: "elm.spacer.limit";
454                                 type: SPACER;
455                                 scale: 1;
456                                 description {
457                                         state: "default" 0.0;
458                                         rel1.relative: 0.5 0.5;
459                                         rel2.relative: 0.5 0.5;
460                                         min: 318 80;
461                                         max: 318 80;
462                                         fixed: 1 1;
463                                 }
464                         }
465                         part {
466                                 name: "elm.text.spacer";
467                                 type: RECT;
468                                 scale: 1;
469                                 description {
470                                         state: "default" 0.0;
471                                         rel1 { relative: 1.0 1.0; to: "elm.bottom.pad"; }
472                                         rel2 { relative: 0.0 1.0; to: "right,pad"; }
473                                         min: 159 0;
474                                         max: 159 0;
475                                         fixed: 1 1;
476                                         align: 1.0 0.5;
477                                 }
478                                 description {
479                                         state: "multi" 0.0;
480                                         inherit: "default" 0.0;
481                                         min: 318 0;
482                                         max: 318 0;
483                                 }
484                         }
485                         part {
486                                 name: "elm.text";
487                                 type: TEXTBLOCK;
488                                 mouse_events: 1;
489                                 entry_mode: PLAIN;
490                                 scale: 1;
491                                 multiline: 1;
492                                 description {
493                                         state: "default" 0.0;
494                                         rel1 { relative: 0.0 1.0; to_x: "elm.text.spacer"; to_y: "elm.top.pad";}
495                                         rel2 { relative: 1.0 0.0; to_x: "elm.text.spacer"; to_y: "elm.bottom.pad"; }
496                                         align: 1.0 0.0;
497                                         fixed: 1 0;
498                                         text {
499                                                 style: "entry_bubble_single_textblock_style";
500                                                 min: 1 1;
501                                                 align: 1.0 0.0;
502                                                 ellipsis: -1;
503                                         }
504                                 }
505                                 description {
506                                         state: "multi" 0.0;
507                                         inherit: "default" 0.0;
508                                         text {
509                                                 style: "entry_bubble_multi_textblock_style";
510                                                 min: 0 1;
511                                                 align: 1.0 0.0;
512                                         }
513                                 }
514                         }
515                         part {
516                                 name: "time";
517                                 type: TEXT;
518                                 mouse_events: 1;
519                                 scale: 1;
520                                 description {
521                         state: "default" 0.0;
522                       rel1 { relative: 0.0 0.0; to: "status_icon"; }
523                       rel2 { relative: 0.0 1.0; to: "status_icon"; }
524                         visible: 1;
525                         align: 1.0 0.5;
526                         min: 0 38;
527                         fixed: 1 1;
528                         color: 250 250 250 255;
529                         text {
530                                 min: 1 1;
531                                 align: 1.0 0.5;
532                                 size: 28;
533                                 ellipsis: -1;
534                                         }
535                                 }
536                         }
537                         part {
538                                 name: "status_icon";
539                                 type: SWALLOW;
540                                 mouse_events: 1;
541                                 scale: 1;
542                                 description {
543                                         state: "default" 0.0;
544                                         rel1 { relative: 0.0 0.0; to: "elm.bubble.rightbottom.pad"; }
545                                         rel2 { relative: 0.0 0.0; to: "elm.bubble.rightbottom.pad"; }
546                                         align: 1.0 0.0;
547                                         min: 0 38;
548                                         fixed: 1 1;
549                                 }
550                                 description {
551                                         state: "status,on";
552                                         inherit: "default" 0.0;
553                                         min: 38 38;
554                                         visible: 1;
555                                 }
556                         }
557                         part {
558                                 name: "event.rect";
559                                 type: RECT;
560                                 repeat_events: 1;
561                                 scale: 1;
562                                 description {
563                                         state: "default" 0.0;
564                                         color: 0 0 0 0;
565                                         rel1.to: "elm.image.bg";
566                                         rel2.to: "elm.image.bg";
567                                 }
568                         }
569                 } // parts
570                 programs {
571                         program {
572                                 name: "focus";
573                                 signal: "load";
574                                 source: "";
575                                 action: FOCUS_SET;
576                                 target: "elm.text";
577                         }
578                         program {
579                                 name: "text_changed";
580                                 signal: "entry,changed";
581                                 source: "*";
582                                 script {
583                                         check_multiline();
584                                 }
585                         }
586                         program {
587                                 name: "resized";
588                                 signal: "resize";
589                                 source: "*";
590                                 script {
591                                         check_multiline();
592                                 }
593                         }
594                         program {
595                                 name: "mouse_down";
596                                 signal: "mouse,down,1";
597                                 source: "event.rect";
598                                 action:  STATE_SET "pressed" 0.0;
599                                 target: "elm.image.bg";
600                         }
601                         program {
602                                 name: "mouse_up";
603                                 signal: "mouse,up,1";
604                                 source: "event.rect";
605                                 action:  STATE_SET "default" 0.0;
606                                 target: "elm.image.bg";
607                         }
608                         program {
609                                 name: "mouse_clicked";
610                                 signal: "mouse,clicked,1";
611                                 source: "event.rect";
612                                 action:  SIGNAL_EMIT "clicked" "item";
613                         }
614                         program {
615                                 name: "status_on";
616                                 signal: "status_on";
617                                 source: "status";
618                                 action:  STATE_SET "status,on" 0.0;
619                                 target: "status_icon";
620                         }
621                         program {
622                                 name: "status_off";
623                                 signal: "status_off";
624                                 source: "status";
625                                 action:  STATE_SET "default" 0.0;
626                                 target: "status_icon";
627                         }
628                 } //programs
629         } //group
630         
631         
632         group { name: "elm/label/base/readmessage1";
633                 script {
634               public multilined = 0;
635         
636               public check_multiline() {
637                  new x, y, w, h;
638                  new xx, yy, ww, hh;
639         
640                  get_geometry(PART:"elm.text", x, y, w, h);
641                  get_geometry(PART:"elm.spacer.limit", xx, yy, ww, hh);
642         
643                  if (!get_int(multilined) && ((w >= ww))) {
644                     set_state(PART:"elm.text", "multi", 0.0);
645                     set_state(PART:"elm.text.spacer", "multi", 0.0);
646                     set_int(multilined, 1);
647                  }
648               }
649            }
650                 parts {
651                         part {
652                                 name: "base";
653                                 type: SPACER;
654                                 scale: 1;
655                                 description {
656                                         state: "default" 0.0;
657                                 }
658                         }
659                         part {
660                                 name: "elm.top.pad";
661                                 type: SPACER;
662                                 scale: 1;
663                                 description {
664                                         rel1 { relative: 0.0 0.0; to: "base"; }
665                                         rel2 { relative: 1.0 0.0; to: "base"; }
666                                         min: 0 36;
667                                         align: 0.5 0.0;
668                                         fixed: 1 0;
669                                 }
670                         }
671                         part {
672                                 name: "text,left,pad";
673                                 type: SPACER;
674                                 scale: 1;
675                                 description {
676                                         rel1 { relative: 0.0 0.0; }
677                                         rel2 { relative: 0.0 1.0; }
678                                         min: 72 0;
679                                         align: 0.0 0.5;
680                                         fixed: 1 0;
681                                 }
682                         }
683                         part {
684                                 name: "elm.image.bg.ef";
685                                 type: IMAGE;
686                                 scale: 1;
687                                 description {
688                                         state: "default" 0.0;
689                                         rel1 { relative: 0.0 0.0; to: "elm.text"; offset: -57 -26; }
690                                         rel2 { relative: 1.0 1.0; to: "status_icon"; offset: 40 26; }
691                                         image {
692                                                 normal: "telegram_bubble_bg_receive_ef.#.png";
693                                                 border: 57 40 26 64;
694                                         }
695                                         fixed: 1 1;
696                                 }
697                         }
698                         part {
699                                 name: "elm.image.bg";
700                                 type: IMAGE;
701                                 scale: 1;
702                                 description {
703                                         state: "default" 0.0;
704                                         rel1 { relative: 0.0 0.0; to: "elm.text"; offset: -57 -26; }
705                                         rel2 { relative: 1.0 1.0; to: "status_icon"; offset: 40 26; }
706                                         image {
707                                                 normal: "telegram_bubble_bg_receive.#.png";
708                                                 border: 57 40 26 64;
709                                         }
710                                         color: 106 126 204 225;
711                                         fixed: 1 1;
712                                 }
713                                 description {
714                                         state: "pressed" 0.0;
715                                         inherit: "default" 0.0;
716                                         color:  60 71 115 255;
717                                 }
718                         }
719                         part {
720                                 name: "elm.spacer.limit";
721                                 type: SPACER;
722                                 scale: 1;
723                                 description {
724                                         state: "default" 0.0;
725                                         rel1.relative: 0.5 0.5;
726                                         rel2.relative: 0.5 0.5;
727                                         min: 318 80;
728                                         max: 318 80;
729                                         fixed: 1 1;
730                                 }
731                         }
732                         part {
733                                 name: "elm.text.spacer";
734                                 type: RECT;
735                                 scale: 1;
736                                 description {
737                                         state: "default" 0.0;
738                                         rel1 { relative: 1.0 1.0; to_x: "text,left,pad";  to_y: "elm.top.pad"; }
739                                         rel2 { relative: 1.0 0.0; to: "elm.bottom.pad"; }
740                                         min: 159 0;
741                                         max: 159 0;
742                                         fixed: 1 1;
743                                         align: 0.0 0.5;
744                                 }
745                                 description {
746                                         state: "multi" 0.0;
747                                         inherit: "default" 0.0;
748                                         min: 318 0;
749                                         max: 318 0;
750                                 }
751                         }
752                         part {
753                                 name: "elm.text";
754                                 type: TEXTBLOCK;
755                                 mouse_events: 1;
756                                 scale: 1;
757                                 multiline: 1;
758                                 description {
759                                         state: "default" 0.0;
760                                         rel1 { relative: 0.0 1.0; to_x: "elm.text.spacer"; to_y: "elm.top.pad";}
761                                         rel2 { relative: 1.0 0.0; to_x: "elm.text.spacer"; to_y: "elm.bottom.pad"; }
762                                         align: 0.0 0.0;
763                                         fixed: 1 0;
764                                         text {
765                                                 style: "entry_bubble_single_textblock_style";
766                                                 min: 1 1;
767                                                 align: 1.0 0.0;
768                                                 ellipsis: -1;
769                                         }
770                                 }
771                                 description {
772                                         state: "multi" 0.0;
773                                         inherit: "default" 0.0;
774                                         text {
775                                                 style: "entry_bubble_multi_textblock_style";
776                                                 min: 0 1;
777                                                 align: 0.0 0.0;
778                                         }
779                                 }
780                         }
781                         part {
782                                 name: "elm.bubble.rightbottom.pad";
783                                 type: SPACER;
784                                 scale: 1;
785                                 description {
786                                         rel1{
787                                                 to: "elm.text";
788                                                 relative: 1.0 1.0;
789                                         }
790                                         rel2.to: "elm.text";
791                                         align: 0.0 0.0;
792                                         min: 40 64;
793                                         fixed: 1 1;
794                                 }
795                         }
796                         part {
797                                 name: "elm.bottom.pad";
798                                 type: SPACER;
799                                 scale: 1;
800                                 description {
801                                         rel1 { relative: 0.0 1.0; }
802                                         rel2 { relative: 1.0 1.0; }
803                                         align: 0.5 1.0;
804                                         min: 0 74;
805                                         fixed: 0 1;
806                                 }
807                         }
808                         part {
809                                 name: "time";
810                                 type: TEXT;
811                                 mouse_events: 1;
812                                 scale: 1;
813                                 description {
814                         state: "default" 0.0;
815                       rel1 { relative: 0.0 0.0; to: "status_icon"; }
816                       rel2 { relative: 0.0 1.0; to: "status_icon"; }
817                         visible: 1;
818                         align: 1.0 0.5;
819                         min: 0 38;
820                         fixed: 1 1;
821                         color: 250 250 250 255;
822                         text {
823                                 min: 1 1;
824                                 align: 1.0 0.5;
825                                 size: 28;
826                                 ellipsis: -1;
827                                         }
828                                 }
829                         }
830                         part {
831                                 name: "status_icon";
832                                 type: SWALLOW;
833                                 mouse_events: 1;
834                                 scale: 1;
835                                 description {
836                                         state: "default" 0.0;
837                                         rel1 { relative: 0.0 0.0; to: "elm.bubble.rightbottom.pad"; }
838                                         rel2 { relative: 0.0 0.0; to: "elm.bubble.rightbottom.pad"; }
839                                         align: 1.0 0.0;
840                                         min: 0 38;
841                                         fixed: 1 1;
842                                 }
843                                 description {
844                                         state: "status,on";
845                                         inherit: "default" 0.0;
846                                         min: 38 38;
847                                         visible: 1;
848                                 }
849                         }
850                         part {
851                                 name: "event.rect";
852                                 type: RECT;
853                                 repeat_events: 1;
854                                 scale: 1;
855                                 description {
856                                         state: "default" 0.0;
857                                         color: 0 0 0 0;
858                                         rel1.to: "elm.image.bg";
859                                         rel2.to: "elm.image.bg";
860                                 }
861                         }
862                 } // parts
863                 programs {
864                         program {
865                                 name: "focus";
866                                 signal: "load";
867                                 source: "";
868                                 action: FOCUS_SET;
869                                 target: "elm.text";
870                         }
871                         program {
872                                 name: "text_changed";
873                                 signal: "entry,changed";
874                                 source: "*";
875                                 script {
876                                         check_multiline();
877                                 }
878                         }
879                         program {
880                                 name: "resized";
881                                 signal: "resize";
882                                 source: "*";
883                                 script {
884                                         check_multiline();
885                                 }
886                         }
887                         program {
888                                 name: "mouse_down";
889                                 signal: "mouse,down,1";
890                                 source: "event.rect";
891                                 action:  STATE_SET "pressed" 0.0;
892                                 target: "elm.image.bg";
893                         }
894                         program {
895                                 name: "mouse_up";
896                                 signal: "mouse,up,1";
897                                 source: "event.rect";
898                                 action:  STATE_SET "default" 0.0;
899                                 target: "elm.image.bg";
900                         }
901                         program {
902                                 name: "mouse_clicked";
903                                 signal: "mouse,clicked,1";
904                                 source: "event.rect";
905                                 action:  SIGNAL_EMIT "clicked" "item";
906                         }
907                         program {
908                                 name: "status_on";
909                                 signal: "status_on";
910                                 source: "status";
911                                 action:  STATE_SET "status,on" 0.0;
912                                 target: "status_icon";
913                         }
914                         program {
915                                 name: "status_off";
916                                 signal: "status_off";
917                                 source: "status";
918                                 action:  STATE_SET "default" 0.0;
919                                 target: "status_icon";
920                         }
921                 } //programs
922         } //group       
923
924         group { name: "elm/label/base/sentmessage1";
925                 script {
926               public multilined = 0;
927         
928               public check_multiline() {
929                  new x, y, w, h;
930                  new xx, yy, ww, hh;
931         
932                  get_geometry(PART:"elm.text", x, y, w, h);
933                  get_geometry(PART:"elm.spacer.limit", xx, yy, ww, hh);
934         
935                  if (!get_int(multilined) && ((w >= ww))) {
936                     set_state(PART:"elm.text", "multi", 0.0);
937                     set_state(PART:"elm.text.spacer", "multi", 0.0);
938                     set_int(multilined, 1);
939                  }
940               }
941            }
942                 parts {
943                         part {
944                                 name: "base";
945                                 type: SPACER;
946                                 scale: 1;
947                                 description {
948                                         state: "default" 0.0;
949                                 }
950                         }
951                         part {
952                                 name: "elm.top.pad";
953                                 type: SPACER;
954                                 scale: 1;
955                                 description {
956                                         rel1 { relative: 0.0 0.0; to: "base"; }
957                                         rel2 { relative: 1.0 0.0; to: "base"; }
958                                         min: 0 36;
959                                         align: 0.5 0.0;
960                                         fixed: 0 1;
961                                 }
962                         }
963                         part {
964                                 name: "right,pad";
965                                 type: SPACER;
966                                 scale: 1;
967                                 description {
968                                         rel1 { relative: 1.0 0.0; }
969                                         rel2 { relative: 1.0 1.0; }
970                                         min: 72 0;
971                                         align: 1.0 0.5;
972                                         fixed: 1 0;
973                                 }
974                         }
975                         part {
976                                 name: "elm.bubble.rightbottom.pad";
977                                 type: SPACER;
978                                 scale: 1;
979                                 description {
980                                         rel1{
981                                                 to: "elm.text";
982                                                 relative: 1.0 1.0;
983                                         }
984                                         rel2.to: "elm.text";
985                                         align: 0.0 0.0;
986                                         min: 57 64;
987                                         fixed: 1 1;
988                                 }
989                         }
990                         part {
991                                 name: "elm.bottom.pad";
992                                 type: SPACER;
993                                 scale: 1;
994                                 description {
995                                         rel1 { relative: 0.0 1.0; }
996                                         rel2 { relative: 1.0 1.0; }
997                                         align: 0.5 1.0;
998                                         min: 0 74;
999                                         fixed: 0 1;
1000                                 }
1001                         }
1002                         part {
1003                                 name: "elm.image.bg.ef";
1004                                 type: IMAGE;
1005                                 scale: 1;
1006                                 description {
1007                                         state: "default" 0.0;
1008                                         rel1 { relative: 0.0 0.0; to: "elm.text"; offset: -40 -26; }
1009                                         rel2 { relative: 1.0 1.0; to: "status_icon"; offset: 57 26; }
1010                                         image {
1011                                                 normal: "telegram_bubble_bg_send_ef.#.png";
1012                                                 border: 40 57 26 64;
1013                                         }
1014                                         fixed: 1 1;
1015                                 }
1016                         }
1017                         part {
1018                                 name: "elm.image.bg";
1019                                 type: IMAGE;
1020                                 scale: 1;
1021                                 description {
1022                                         state: "default" 0.0;
1023                                         rel1 { relative: 0.0 0.0; to: "elm.text"; offset: -40 -26; }
1024                                         rel2 { relative: 1.0 1.0; to: "status_icon"; offset: 57 26; }
1025                                         image {
1026                                                 normal: "telegram_bubble_bg_send.#.png";
1027                                                 border: 40 57 26 64;
1028                                         }
1029                                         color: 45 165 224 229;
1030                                         fixed: 1 1;
1031                                 }
1032                                 description {
1033                                         state: "pressed" 0.0;
1034                                         inherit: "default" 0.0;
1035                                         color: 27 99 135 255;
1036                                 }
1037                         }
1038                         part {
1039                                 name: "elm.spacer.limit";
1040                                 type: SPACER;
1041                                 scale: 1;
1042                                 description {
1043                                         state: "default" 0.0;
1044                                         rel1.relative: 0.5 0.5;
1045                                         rel2.relative: 0.5 0.5;
1046                                         min: 318 80;
1047                                         max: 318 80;
1048                                         fixed: 1 1;
1049                                 }
1050                         }
1051                         part {
1052                                 name: "elm.text.spacer";
1053                                 type: RECT;
1054                                 scale: 1;
1055                                 description {
1056                                         state: "default" 0.0;
1057                                         rel1 { relative: 1.0 1.0; to: "elm.bottom.pad"; }
1058                                         rel2 { relative: 0.0 1.0; to: "right,pad"; }
1059                                         min: 159 0;
1060                                         max: 159 0;
1061                                         fixed: 1 1;
1062                                         align: 1.0 0.5;
1063                                 }
1064                                 description {
1065                                         state: "multi" 0.0;
1066                                         inherit: "default" 0.0;
1067                                         min: 318 0;
1068                                         max: 318 0;
1069                                 }
1070                         }
1071                         part {
1072                                 name: "elm.text";
1073                                 type: TEXTBLOCK;
1074                                 mouse_events: 1;
1075                                 scale: 1;
1076                                 multiline: 1;
1077                                 description {
1078                                         state: "default" 0.0;
1079                                         rel1 { relative: 0.0 1.0; to_x: "elm.text.spacer"; to_y: "elm.top.pad";}
1080                                         rel2 { relative: 1.0 0.0; to_x: "elm.text.spacer"; to_y: "elm.bottom.pad"; }
1081                                         align: 1.0 0.0;
1082                                         fixed: 1 0;
1083                                         text {
1084                                                 style: "entry_bubble_single_textblock_style";
1085                                                 min: 1 1;
1086                                                 align: 1.0 0.0;
1087                                                 ellipsis: -1;
1088                                         }
1089                                 }
1090                                 description {
1091                                         state: "multi" 0.0;
1092                                         inherit: "default" 0.0;
1093                                         text {
1094                                                 style: "entry_bubble_multi_textblock_style";
1095                                                 min: 0 1;
1096                                                 align: 1.0 0.0;
1097                                         }
1098                                 }
1099                         }
1100                         part {
1101                                 name: "time";
1102                                 type: TEXT;
1103                                 mouse_events: 1;
1104                                 scale: 1;
1105                                 description {
1106                         state: "default" 0.0;
1107                       rel1 { relative: 0.0 0.0; to: "status_icon"; }
1108                       rel2 { relative: 0.0 1.0; to: "status_icon"; }
1109                         visible: 1;
1110                         align: 1.0 0.5;
1111                         min: 0 38;
1112                         fixed: 1 1;
1113                         color: 250 250 250 255;
1114                         text {
1115                                 min: 1 1;
1116                                 align: 1.0 0.5;
1117                                 size: 28;
1118                                 ellipsis: -1;
1119                                         }
1120                                 }
1121                         }
1122                         part {
1123                                 name: "status_icon";
1124                                 type: SWALLOW;
1125                                 mouse_events: 1;
1126                                 scale: 1;
1127                                 description {
1128                                         state: "default" 0.0;
1129                                         rel1 { relative: 0.0 0.0; to: "elm.bubble.rightbottom.pad"; }
1130                                         rel2 { relative: 0.0 0.0; to: "elm.bubble.rightbottom.pad"; }
1131                                         align: 1.0 0.0;
1132                                         min: 0 38;
1133                                         fixed: 1 1;
1134                                 }
1135                                 description {
1136                                         state: "status,on";
1137                                         inherit: "default" 0.0;
1138                                         min: 38 38;
1139                                         visible: 1;
1140                                 }
1141                         }
1142                         part {
1143                                 name: "event.rect";
1144                                 type: RECT;
1145                                 repeat_events: 1;
1146                                 scale: 1;
1147                                 description {
1148                                         state: "default" 0.0;
1149                                         color: 0 0 0 0;
1150                                         rel1.to: "elm.image.bg";
1151                                         rel2.to: "elm.image.bg";
1152                                 }
1153                         }
1154                 } // parts
1155                 programs {
1156                         program {
1157                                 name: "focus";
1158                                 signal: "load";
1159                                 source: "";
1160                                 action: FOCUS_SET;
1161                                 target: "elm.text";
1162                         }
1163                         program {
1164                                 name: "text_changed";
1165                                 signal: "entry,changed";
1166                                 source: "*";
1167                                 script {
1168                                         check_multiline();
1169                                 }
1170                         }
1171                         program {
1172                                 name: "resized";
1173                                 signal: "resize";
1174                                 source: "*";
1175                                 script {
1176                                         check_multiline();
1177                                 }
1178                         }
1179                         program {
1180                                 name: "mouse_down";
1181                                 signal: "mouse,down,1";
1182                                 source: "event.rect";
1183                                 action:  STATE_SET "pressed" 0.0;
1184                                 target: "elm.image.bg";
1185                         }
1186                         program {
1187                                 name: "mouse_up";
1188                                 signal: "mouse,up,1";
1189                                 source: "event.rect";
1190                                 action:  STATE_SET "default" 0.0;
1191                                 target: "elm.image.bg";
1192                         }
1193                         program {
1194                                 name: "mouse_clicked";
1195                                 signal: "mouse,clicked,1";
1196                                 source: "event.rect";
1197                                 action:  SIGNAL_EMIT "clicked" "item";
1198                         }
1199                         program {
1200                                 name: "status_on";
1201                                 signal: "status_on";
1202                                 source: "status";
1203                                 action:  STATE_SET "status,on" 0.0;
1204                                 target: "status_icon";
1205                         }
1206                         program {
1207                                 name: "status_off";
1208                                 signal: "status_off";
1209                                 source: "status";
1210                                 action:  STATE_SET "default" 0.0;
1211                                 target: "status_icon";
1212                         }
1213                 } //programs
1214         } //group
1215 } //collection