summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Williams <andy@andywilliams.me>2017-03-10 22:14:29 +0000
committerAndy Williams <andy@andywilliams.me>2017-03-10 22:14:29 +0000
commitb7ea8fc01e7eaacf7e7a38f79a654811d1a5b26f (patch)
treec4e3dc1992f767150b1b86dedf82fc68471b2fc8
parent9d8bc92c4a3e1e8452935ed9f54f3b8c09789e7b (diff)
luncher: Update theme to ensure we're sending scale reset signls
-rw-r--r--data/elementary/themes/edc/luncher.edc17
1 files changed, 7 insertions, 10 deletions
diff --git a/data/elementary/themes/edc/luncher.edc b/data/elementary/themes/edc/luncher.edc
index 329fd88778..9b1779c2de 100644
--- a/data/elementary/themes/edc/luncher.edc
+++ b/data/elementary/themes/edc/luncher.edc
@@ -46,7 +46,7 @@ group { name: "e/gadget/luncher/icon";
46 public current_size; 46 public current_size;
47 public Float:engage_scale(cursorpos, iconpos, size) { 47 public Float:engage_scale(cursorpos, iconpos, size) {
48 new Float:zoom = 1.5; 48 new Float:zoom = 1.5;
49 new Float:scale = (zoom+0.25) - (abs(cursorpos-(iconpos+size/2)) / (size*2)); 49 new Float:scale = (zoom+0.25) - (abs(cursorpos-(iconpos+size/3)) / (size*3));
50 if (scale < 1.0) scale = 1.0; 50 if (scale < 1.0) scale = 1.0;
51 if (scale > zoom) scale = zoom; 51 if (scale > zoom) scale = zoom;
52 52
@@ -93,50 +93,47 @@ group { name: "e/gadget/luncher/icon";
93 } 93 }
94 } 94 }
95 else if (!strcmp(s, "engage")) { 95 else if (!strcmp(s, "engage")) {
96 set_state_anim(PART:"sizer", "default", 0.0, LINEAR, 1.0); 96 new Float:scale = 1.0;
97 if (pos == 0 && (xpos >= x) && (xpos <= (x+w))) { 97 if (pos == 0 && (xpos >= x) && (xpos <= (x+w))) {
98 new Float:scale = engage_scale(ypos, y, h); 98 scale = engage_scale(ypos, y, h);
99 new Float:halfscale = scale/2; 99 new Float:halfscale = scale/2;
100 100
101 custom_state(PART:"sizer", "default", 0.0); 101 custom_state(PART:"sizer", "default", 0.0);
102 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);
103 set_state_val(PART:"sizer", STATE_REL2, scale, 0.5+halfscale); 103 set_state_val(PART:"sizer", STATE_REL2, scale, 0.5+halfscale);
104 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);
106 } 105 }
107 else if (pos == 1 && (ypos >= y) && (ypos <= (y+h))) { 106 else if (pos == 1 && (ypos >= y) && (ypos <= (y+h))) {
108 new Float:scale = engage_scale(xpos, x, w); 107 scale = engage_scale(xpos, x, w);
109 new Float:halfscale = scale/2; 108 new Float:halfscale = scale/2;
110 109
111 custom_state(PART:"sizer", "default", 0.0); 110 custom_state(PART:"sizer", "default", 0.0);
112 set_state_val(PART:"sizer", STATE_REL1, 0.5-halfscale, 0.0); 111 set_state_val(PART:"sizer", STATE_REL1, 0.5-halfscale, 0.0);
113 set_state_val(PART:"sizer", STATE_REL2, 0.5+halfscale, scale); 112 set_state_val(PART:"sizer", STATE_REL2, 0.5+halfscale, scale);
114 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0); 113 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0);
115 send_message(MSG_STRING_FLOAT_SET, 1, "Scale", scale);
116 } 114 }
117 else if (pos == 2 && (xpos >= x) && (xpos <= (x+w))) { 115 else if (pos == 2 && (xpos >= x) && (xpos <= (x+w))) {
118 new Float:scale = engage_scale(ypos, y, h); 116 scale = engage_scale(ypos, y, h);
119 new Float:halfscale = scale/2; 117 new Float:halfscale = scale/2;
120 118
121 custom_state(PART:"sizer", "default", 0.0); 119 custom_state(PART:"sizer", "default", 0.0);
122 set_state_val(PART:"sizer", STATE_REL1, 1.0-scale, 0.5-halfscale); 120 set_state_val(PART:"sizer", STATE_REL1, 1.0-scale, 0.5-halfscale);
123 set_state_val(PART:"sizer", STATE_REL2, 1.0, 0.5+halfscale); 121 set_state_val(PART:"sizer", STATE_REL2, 1.0, 0.5+halfscale);
124 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0); 122 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0);
125 send_message(MSG_STRING_FLOAT_SET, 1, "Scale", scale);
126 } 123 }
127 else if (pos == 3 && (ypos >= y) && (ypos <= (y+h))) { 124 else if (pos == 3 && (ypos >= y) && (ypos <= (y+h))) {
128 new Float:scale = engage_scale(xpos, x, w); 125 scale = engage_scale(xpos, x, w);
129 new Float:halfscale = scale/2; 126 new Float:halfscale = scale/2;
130 127
131 custom_state(PART:"sizer", "default", 0.0); 128 custom_state(PART:"sizer", "default", 0.0);
132 set_state_val(PART:"sizer", STATE_REL1, 0.5-halfscale, 1.0-scale); 129 set_state_val(PART:"sizer", STATE_REL1, 0.5-halfscale, 1.0-scale);
133 set_state_val(PART:"sizer", STATE_REL2, 0.5+halfscale, 1.0); 130 set_state_val(PART:"sizer", STATE_REL2, 0.5+halfscale, 1.0);
134 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0); 131 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0);
135 send_message(MSG_STRING_FLOAT_SET, 1, "Scale", scale);
136 } 132 }
137 else { 133 else {
138 set_state_anim(PART:"sizer", "default", 0.0, LINEAR, 1.0); 134 set_state_anim(PART:"sizer", "default", 0.0, LINEAR, 1.0);
139 } 135 }
136 send_message(MSG_STRING_FLOAT_SET, 1, "Scale", scale);
140 emit("e,state,resized", "e"); 137 emit("e,state,resized", "e");
141 } 138 }
142 } 139 }