summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen 'Okra' Houston <smhouston88@gmail.com>2017-03-08 18:20:10 -0600
committerStephen 'Okra' Houston <smhouston88@gmail.com>2017-03-08 18:20:10 -0600
commit1a5563ab636ee37bea39d68d0da04114c2ac6245 (patch)
treed818ac3effa367ac9c585a475bc99983dcc97234
parent27a62edd68fae2f00be0214993dad34309084947 (diff)
Luncher theme: Prepare to size engage correctly.
-rw-r--r--data/elementary/themes/edc/luncher.edc8
1 files changed, 7 insertions, 1 deletions
diff --git a/data/elementary/themes/edc/luncher.edc b/data/elementary/themes/edc/luncher.edc
index 1a70743c65..329fd88778 100644
--- a/data/elementary/themes/edc/luncher.edc
+++ b/data/elementary/themes/edc/luncher.edc
@@ -43,6 +43,7 @@ group { name: "e/gadget/luncher/icon";
43 script { 43 script {
44 public urgent; 44 public urgent;
45 public style; 45 public style;
46 public current_size;
46 public Float:engage_scale(cursorpos, iconpos, size) { 47 public Float:engage_scale(cursorpos, iconpos, size) {
47 new Float:zoom = 1.5; 48 new Float:zoom = 1.5;
48 new Float:scale = (zoom+0.25) - (abs(cursorpos-(iconpos+size/2)) / (size*2)); 49 new Float:scale = (zoom+0.25) - (abs(cursorpos-(iconpos+size/2)) / (size*2));
@@ -92,6 +93,7 @@ group { name: "e/gadget/luncher/icon";
92 } 93 }
93 } 94 }
94 else if (!strcmp(s, "engage")) { 95 else if (!strcmp(s, "engage")) {
96 set_state_anim(PART:"sizer", "default", 0.0, LINEAR, 1.0);
95 if (pos == 0 && (xpos >= x) && (xpos <= (x+w))) { 97 if (pos == 0 && (xpos >= x) && (xpos <= (x+w))) {
96 new Float:scale = engage_scale(ypos, y, h); 98 new Float:scale = engage_scale(ypos, y, h);
97 new Float:halfscale = scale/2; 99 new Float:halfscale = scale/2;
@@ -100,6 +102,7 @@ group { name: "e/gadget/luncher/icon";
100 set_state_val(PART:"sizer", STATE_REL1, 0.0, 0.5-halfscale); 102 set_state_val(PART:"sizer", STATE_REL1, 0.0, 0.5-halfscale);
101 set_state_val(PART:"sizer", STATE_REL2, scale, 0.5+halfscale); 103 set_state_val(PART:"sizer", STATE_REL2, scale, 0.5+halfscale);
102 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0); 104 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0);
105 send_message(MSG_STRING_FLOAT_SET, 1, "Scale", scale);
103 } 106 }
104 else if (pos == 1 && (ypos >= y) && (ypos <= (y+h))) { 107 else if (pos == 1 && (ypos >= y) && (ypos <= (y+h))) {
105 new Float:scale = engage_scale(xpos, x, w); 108 new Float:scale = engage_scale(xpos, x, w);
@@ -109,6 +112,7 @@ group { name: "e/gadget/luncher/icon";
109 set_state_val(PART:"sizer", STATE_REL1, 0.5-halfscale, 0.0); 112 set_state_val(PART:"sizer", STATE_REL1, 0.5-halfscale, 0.0);
110 set_state_val(PART:"sizer", STATE_REL2, 0.5+halfscale, scale); 113 set_state_val(PART:"sizer", STATE_REL2, 0.5+halfscale, scale);
111 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0); 114 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0);
115 send_message(MSG_STRING_FLOAT_SET, 1, "Scale", scale);
112 } 116 }
113 else if (pos == 2 && (xpos >= x) && (xpos <= (x+w))) { 117 else if (pos == 2 && (xpos >= x) && (xpos <= (x+w))) {
114 new Float:scale = engage_scale(ypos, y, h); 118 new Float:scale = engage_scale(ypos, y, h);
@@ -118,6 +122,7 @@ group { name: "e/gadget/luncher/icon";
118 set_state_val(PART:"sizer", STATE_REL1, 1.0-scale, 0.5-halfscale); 122 set_state_val(PART:"sizer", STATE_REL1, 1.0-scale, 0.5-halfscale);
119 set_state_val(PART:"sizer", STATE_REL2, 1.0, 0.5+halfscale); 123 set_state_val(PART:"sizer", STATE_REL2, 1.0, 0.5+halfscale);
120 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0); 124 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0);
125 send_message(MSG_STRING_FLOAT_SET, 1, "Scale", scale);
121 } 126 }
122 else if (pos == 3 && (ypos >= y) && (ypos <= (y+h))) { 127 else if (pos == 3 && (ypos >= y) && (ypos <= (y+h))) {
123 new Float:scale = engage_scale(xpos, x, w); 128 new Float:scale = engage_scale(xpos, x, w);
@@ -127,12 +132,13 @@ group { name: "e/gadget/luncher/icon";
127 set_state_val(PART:"sizer", STATE_REL1, 0.5-halfscale, 1.0-scale); 132 set_state_val(PART:"sizer", STATE_REL1, 0.5-halfscale, 1.0-scale);
128 set_state_val(PART:"sizer", STATE_REL2, 0.5+halfscale, 1.0); 133 set_state_val(PART:"sizer", STATE_REL2, 0.5+halfscale, 1.0);
129 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0); 134 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0);
135 send_message(MSG_STRING_FLOAT_SET, 1, "Scale", scale);
130 } 136 }
131 else { 137 else {
132 set_state_anim(PART:"sizer", "default", 0.0, LINEAR, 1.0); 138 set_state_anim(PART:"sizer", "default", 0.0, LINEAR, 1.0);
133 } 139 }
140 emit("e,state,resized", "e");
134 } 141 }
135 emit("e,state,resized", "e");
136 } 142 }
137 } 143 }
138 } 144 }