summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorStephen 'Okra' Houston <smhouston88@gmail.com>2017-09-01 13:45:09 -0500
committerStephen 'Okra' Houston <smhouston88@gmail.com>2017-09-01 13:46:22 -0500
commit8df0576358ac25b7f3d286e6463fe4f052428597 (patch)
tree25d08ba2aa628d301177ac953d9336c0fc06564f /data
parente368896145dd47943467679a343a533b575a1aca (diff)
Luncher: Remove the engage feature.
The engage feature was mainly there as a demo of the capabilities of bryce. Now that we are nearing release we need to clean up our gadgets. The engage style for the luncher gadget is not complete, and does not work adequately, and quite honestly better belongs as a feature of bryce itself not luncher.
Diffstat (limited to 'data')
-rw-r--r--data/elementary/themes/edc/luncher.edc102
1 files changed, 5 insertions, 97 deletions
diff --git a/data/elementary/themes/edc/luncher.edc b/data/elementary/themes/edc/luncher.edc
index 35ac82a803..6e8aa38aba 100644
--- a/data/elementary/themes/edc/luncher.edc
+++ b/data/elementary/themes/edc/luncher.edc
@@ -42,101 +42,6 @@ group { name: "e/gadget/luncher/grid";
42group { name: "e/gadget/luncher/icon"; 42group { name: "e/gadget/luncher/icon";
43 script { 43 script {
44 public urgent; 44 public urgent;
45 public style;
46 public current_size;
47 public Float:engage_scale(cursorpos, iconpos, size) {
48 new Float:zoom = 1.75;
49 new Float:scale = zoom - (abs(cursorpos-(iconpos+size/2)) / (size*4));
50 if (scale < 1.0) scale = 1.0;
51
52 return scale;
53 }
54 public message(Msg_Type:type, id, ...) {
55
56//Style Variable - Used to Identify Style - Name Must Match an Item in the Data List of e/gadget/luncher/bar
57//Style Setting Messages Will Always Have an ID of 1
58//Icon Messages Related To The Style Will Have an ID of 2.
59//Arguments are in the Following Order:
60//X Position of the Cursor
61//Y Position of the Cursor
62//X Position of Icon
63//Y Position of Icon
64//Width of icon
65//Height of icon
66//Location of the bar - 0 is left, 1 is top, 2 is right, 3 is bottom
67
68 if ((type == MSG_STRING) && (id == 1)) {
69 new s[32];
70
71 getsarg(2, s, sizeof(s));
72 set_str(style, s);
73 }
74 if ((type == MSG_INT_SET) && (id == 2)) {
75 new xpos = getarg(2);
76 new ypos = getarg(3);
77 new x = getarg(4);
78 new y = getarg(5);
79 new w = getarg(6);
80 new h = getarg(7);
81 new pos = getarg(8);
82 new s[32];
83
84 get_str(style, s, sizeof(s));
85
86 if (!strcmp(s, "default")) {
87 if ((ypos >= y) && (ypos <= (y+h)) && (xpos >= x) && (xpos <= (x+w))) {
88 set_state_anim(PART:"background", "visible", 0.0, LINEAR, 1.0);
89 }
90 else {
91 set_state_anim(PART:"background", "default", 0.0, LINEAR, 1.0);
92 }
93 }
94 else if (!strcmp(s, "engage")) {
95 new Float:scale = 1.0;
96 if (pos == 0 && (xpos >= x) && (xpos <= (x+w))) {
97 scale = engage_scale(ypos, y, h);
98 new Float:halfscale = scale/2.0;
99
100 custom_state(PART:"sizer", "default", 0.0);
101 set_state_val(PART:"sizer", STATE_REL1, 0.0, 0.5-halfscale);
102 set_state_val(PART:"sizer", STATE_REL2, scale, 0.5+halfscale);
103 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0);
104 }
105 else if (pos == 1 && (ypos >= y) && (ypos <= (y+h))) {
106 scale = engage_scale(xpos, x, w);
107 new Float:halfscale = scale/2.0;
108
109 custom_state(PART:"sizer", "default", 0.0);
110 set_state_val(PART:"sizer", STATE_REL1, 0.5-halfscale, 0.0);
111 set_state_val(PART:"sizer", STATE_REL2, 0.5+halfscale, scale);
112 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0);
113 }
114 else if (pos == 2 && (xpos >= x) && (xpos <= (x+w))) {
115 scale = engage_scale(ypos, y, h);
116 new Float:halfscale = scale/2.0;
117
118 custom_state(PART:"sizer", "default", 0.0);
119 set_state_val(PART:"sizer", STATE_REL1, 1.0-scale, 0.5-halfscale);
120 set_state_val(PART:"sizer", STATE_REL2, 1.0, 0.5+halfscale);
121 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0);
122 }
123 else if (pos == 3 && (ypos >= y) && (ypos <= (y+h))) {
124 scale = engage_scale(xpos, x, w);
125 new Float:halfscale = scale/2.0;
126
127 custom_state(PART:"sizer", "default", 0.0);
128 set_state_val(PART:"sizer", STATE_REL1, 0.5-halfscale, 1.0-scale);
129 set_state_val(PART:"sizer", STATE_REL2, 0.5+halfscale, 1.0);
130 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0);
131 }
132 else {
133 set_state_anim(PART:"sizer", "default", 0.0, LINEAR, 1.0);
134 }
135 send_message(MSG_STRING_FLOAT_SET, 1, "Scale", scale);
136 emit("e,state,resized", "e");
137 }
138 }
139 }
140 } 45 }
141 parts { 46 parts {
142 part { name: "item_clip"; type: RECT; 47 part { name: "item_clip"; type: RECT;
@@ -183,13 +88,13 @@ group { name: "e/gadget/luncher/icon";
183 mouse_events: 0; 88 mouse_events: 0;
184 description { state: "default" 0.0; 89 description { state: "default" 0.0;
185 visible: 0; 90 visible: 0;
186 align: 0.6 0.6;
187 color: 255 255 255 0; 91 color: 255 255 255 0;
188 } 92 }
189 description { state: "on_left" 0.0; 93 description { state: "on_left" 0.0;
190 inherit: "default" 0.0; 94 inherit: "default" 0.0;
191 visible: 1; 95 visible: 1;
192 rel1.relative: 0.0 0.025; 96 rel1.relative: 0.0 0.025;
97 rel1.offset: 0 1;
193 rel2.relative: 0.05 0.975; 98 rel2.relative: 0.05 0.975;
194 color: 51 153 255 255; 99 color: 51 153 255 255;
195 } 100 }
@@ -197,6 +102,7 @@ group { name: "e/gadget/luncher/icon";
197 inherit: "default" 0.0; 102 inherit: "default" 0.0;
198 visible: 1; 103 visible: 1;
199 rel1.relative: 0.025 0.0; 104 rel1.relative: 0.025 0.0;
105 rel1.offset: 1 0;
200 rel2.relative: 0.975 0.05; 106 rel2.relative: 0.975 0.05;
201 color: 51 153 255 255; 107 color: 51 153 255 255;
202 } 108 }
@@ -204,6 +110,7 @@ group { name: "e/gadget/luncher/icon";
204 inherit: "default" 0.0; 110 inherit: "default" 0.0;
205 visible: 1; 111 visible: 1;
206 rel1.relative: 0.95 0.025; 112 rel1.relative: 0.95 0.025;
113 rel1.offset: 0 1;
207 rel2.relative: 1.0 0.975; 114 rel2.relative: 1.0 0.975;
208 color: 51 153 255 255; 115 color: 51 153 255 255;
209 } 116 }
@@ -211,6 +118,7 @@ group { name: "e/gadget/luncher/icon";
211 inherit: "default" 0.0; 118 inherit: "default" 0.0;
212 visible: 1; 119 visible: 1;
213 rel1.relative: 0.025 0.95; 120 rel1.relative: 0.025 0.95;
121 rel1.offset: 1 0;
214 rel2.relative: 0.975 1.0; 122 rel2.relative: 0.975 1.0;
215 color: 51 153 255 255; 123 color: 51 153 255 255;
216 } 124 }
@@ -727,7 +635,7 @@ group { name: "elm/tooltip/base/luncher";
727 } 635 }
728 rel2 { 636 rel2 {
729 to: "elm.swallow.content"; 637 to: "elm.swallow.content";
730 offset: 3 -5; 638 offset: 3 -6;
731 } 639 }
732 color: 15 15 15 175; 640 color: 15 15 15 175;
733 } 641 }