summaryrefslogtreecommitdiff
path: root/data/themes/list_basic.edc
blob: b65f384470035f0bc5c2b95670c18f700cefd23d (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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
collections {
   group { name: "list";
      parts {
         part { name: "base"; type: RECT;
            description { state: "default";
               color: 0 0 0 255;
            }
         }
         part { name: "swallow.list"; type: SWALLOW;
            description { state: "default";
            }
         }
      }
   }

   group { name: "status_icon"; min: 16 16;
      images {
         image: "arrows_both.png" COMP;
         image: "arrows_pending_left.png" COMP;
         image: "arrows_pending_right.png" COMP;
         image: "arrows_rejected.png" COMP;
         image: "x.png" COMP;
      }
      script {
         public message(Msg_Type:type, id, ...) {
            if ((type == MSG_INT_SET) && (id == 0)) {
               new idle, alpha;

               idle = getarg(2);

               custom_state(PART:"clip", "default", 0.0);
               if (idle >= 10) {
                 alpha=255-(12*((idle-10)/10));
                 if (alpha < 64)
                   alpha = 64;
               } else
                 alpha=255;
               set_state_val(PART:"clip", STATE_COLOR, 255, 255, 255, alpha);
            }
         }
      }
      parts {
         part { name: "color_clip"; type: RECT;
            description { state: "default";
               color: 255 255 255 255;
            }
            description { state: "s2.normal";
               color: 0 230 0 255;
            }
            description { state: "s2.away";
               color: 255 255 51 255;
            }
            description { state: "s2.chat";
               color: 0 255 0 255;
            }
            description { state: "s2.dnd";
               color: 0 0 255 255;
            }
            description { state: "s2.xa";
               color: 255 0 0 255;
            }
         }
         part { name: "clip"; type: RECT; clip_to: "color_clip";
            description { state: "default";
               color: 255 255 255 255;
            }
         }
         part { name: "img"; clip_to: "clip";
            scale: 1;
            description { state: "default";
               aspect: 1.0 1.0;
               aspect_preference: BOTH;
               image.normal: "arrows_both.png";
            }
            description { state: "left";
               inherit: "default";
               image.normal: "arrows_pending_left.png";
            }
            description { state: "right";
               inherit: "default";
               image.normal: "arrows_pending_right.png";
            }
            description { state: "rejected";
               inherit: "default";
               image.normal: "arrows_rejected.png";
            }
            description { state: "x";
               inherit: "default";
               image.normal: "x.png";
            }
         }
      }
      programs {
         program {
            signal: "s2.both"; source: "s2";
            action: STATE_SET "default" 0.0;
            target: "img";
         }
         program {
            signal: "s2.left"; source: "s2";
            action: STATE_SET "left" 0.0;
            target: "img";
         }
         program {
            signal: "s2.right"; source: "s2";
            action: STATE_SET "right" 0.0;
            target: "img";
         }
         program {
            signal: "s2.rejected"; source: "s2";
            action: STATE_SET "rejected" 0.0;
            target: "img";
         }
         program {
            signal: "s2.x"; source: "s2";
            action: STATE_SET "x" 0.0;
            target: "img";
         }
#define STATUS(X) \
         program { \
            signal: X; source: "s2"; \
            action: STATE_SET X 0.0; \
            target: "color_clip"; \
            transition: LINEAR 0.3; \
         }
         //STATUS("s2.none")
         STATUS("s2.normal")
         STATUS("s2.away")
         STATUS("s2.chat")
         STATUS("s2.dnd")
         STATUS("s2.xa")
      }
   }
#define ICON(Name, Min, Max, Rel1, Rel2)                      \
 group { name: "list_basic/"##Name##""; min: Min Min; max: Max Max; \
    images.image: Name##".png" COMP; parts { part { name: "base";             \
    description { aspect: 1.0 1.0; aspect_preference: BOTH; rel1.offset: Rel1 Rel1; rel2.offset: Rel2 Rel2; \
             image.normal: Name##".png"; } } } }
#if 0
   ICON("x", 16, 0, 0, 0);
   ICON("useradd", 16, 0, 0, 0);
   ICON("userdel", 16, 0, 0, 0);
   ICON("dialog_ok", 16, 0, 0, 0);
   ICON("settings", 16, 0, 0, 0);
   ICON("status", 16, 0, 0, 0);
   ICON("logout", 16, 0, 0, 0);

   ICON("useroffline", 16, 0, 5, -6);
#endif
   ICON("userunknown", 16, 0, 5, -6);

   group { name: "info_mover";
      parts {
         part { name: "swallow.mover"; type: SWALLOW;
            scale: 1;
            description { state: "default" 0.0;
               fixed: 1 1;
               visible: 0;
               rel1 {
                  relative: 1.0 0.0;
                  offset: 888 8;
               }
               rel2 {
                  relative: 1.0 1.0;
                  offset: 8 -9;
               }
            }
            description { state: "visible" 0.0;
               inherit: "default" 0.0;
               visible: 1;
               rel1 {
                  relative: 0 0;
                  offset: 8 8;
               }
               rel2 {
                  offset: -9 -9;
               }
            }
         }
      }
      program { name: "show";
         signal: "s2.show"; source: "s2";
         action: STATE_SET "visible" 0.0;
         transition: LINEAR 0.3;
         target: "swallow.mover";
      }
      program {
         signal: "s2.hide"; source: "s2";
         action: STATE_SET "default" 0.0;
         transition: LINEAR 0.3 CURRENT;
         target: "swallow.mover";
         after: "hide_after";
      }
      program { name: "hide_after";
         action: SIGNAL_EMIT "s2.hide.done" "";
      }
   }
}