summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-09-12 17:16:41 +0900
committerStefan Schmidt <stefan@datenfreihafen.org>2015-09-16 17:03:47 +0200
commit1752e9079bec593f82c2e2d7ce71fb58b916e1d9 (patch)
tree9286d1fab2b56a0f3bd2124b372177e31d8b7865
parent07d916e40adcfec5534435ca280f3c00e6e0ac1f (diff)
elm toolbar 0 size items fix if icon not found
this fixes a bug with horizontal style toolbar items and toolbar code itself simply emitting the wrong signals that causes 0 height items. this fixes T2710 @fix
-rw-r--r--data/themes/edc/elm/toolbar.edc492
-rw-r--r--src/lib/elm_toolbar.c15
2 files changed, 484 insertions, 23 deletions
diff --git a/data/themes/edc/elm/toolbar.edc b/data/themes/edc/elm/toolbar.edc
index a2c157abd..8b3dc5ad3 100644
--- a/data/themes/edc/elm/toolbar.edc
+++ b/data/themes/edc/elm/toolbar.edc
@@ -365,6 +365,7 @@ group { name: "elm/toolbar/base/default";
365 365
366// === item: standard default item 366// === item: standard default item
367group { name: "elm/toolbar/item/default"; 367group { name: "elm/toolbar/item/default";
368 alias: "elm/toolbar/item/item_centered";
368 data.item: "transition_animation_on" "1"; 369 data.item: "transition_animation_on" "1";
369 data.item: "focusraise" "on"; 370 data.item: "focusraise" "on";
370 371
@@ -876,7 +877,6 @@ group { name: "elm/toolbar/item/default";
876 877
877 program { name: "st1"; 878 program { name: "st1";
878 signal: "elm,text,hidden"; source: "elm"; 879 signal: "elm,text,hidden"; source: "elm";
879 action: STATE_SET "notext" 0.0;
880 script { 880 script {
881 new m = get_int(btmode); 881 new m = get_int(btmode);
882 m &= ~LABEL; set_int(btmode, m); 882 m &= ~LABEL; set_int(btmode, m);
@@ -895,7 +895,7 @@ group { name: "elm/toolbar/item/default";
895 signal: "elm,icon,hidden"; source: "elm"; 895 signal: "elm,icon,hidden"; source: "elm";
896 script { 896 script {
897 new m = get_int(btmode); 897 new m = get_int(btmode);
898 m |= ICON; set_int(btmode, m); 898 m &= ~ICON; set_int(btmode, m);
899 eval_mode(m); 899 eval_mode(m);
900 } 900 }
901 } 901 }
@@ -903,7 +903,7 @@ group { name: "elm/toolbar/item/default";
903 signal: "elm,icon,visible"; source: "elm"; 903 signal: "elm,icon,visible"; source: "elm";
904 script { 904 script {
905 new m = get_int(btmode); 905 new m = get_int(btmode);
906 m &= ~ICON; set_int(btmode, m); 906 m |= ICON; set_int(btmode, m);
907 eval_mode(m); 907 eval_mode(m);
908 } 908 }
909 } 909 }
@@ -993,14 +993,165 @@ group { name: "elm/toolbar/item/default";
993 993
994// === item: style assumed to exist 994// === item: style assumed to exist
995group { name: "elm/toolbar/item/item_horizontal"; 995group { name: "elm/toolbar/item/item_horizontal";
996 inherit: "elm/toolbar/item/default"; 996 data.item: "transition_animation_on" "1";
997 data.item: "focusraise" "on";
998
999 images.image: "shadow_inset_bevels.png" COMP;
1000 images.image: "shadow_angled_in_sides.png" COMP;
1001 images.image: "horizontal_separated_bar_small_glow.png" COMP;
1002 images.image: "bevel_dark_in.png" COMP;
1003#define ICON 1
1004#define LABEL 2
1005#define MASK 3
1006#define DISABLE 4
1007 script {
1008 public btmode;
1009 public eval_mode(m) {
1010 new m1 = m & MASK;
1011 new d = m & DISABLE;
1012 if (m1 == (ICON | LABEL)) {
1013 if (!d) {
1014 set_state(PART:"elm.swallow.icon", "default", 0.0);
1015 set_state(PART:"icon_clip", "default", 0.0);
1016 set_state(PART:"elm.text", "default", 0.0);
1017 set_state(PART:"label2", "default", 0.0);
1018 } else {
1019 set_state(PART:"elm.swallow.icon", "default", 0.0);
1020 set_state(PART:"icon_clip", "disabled", 0.0);
1021 set_state(PART:"elm.text", "disabled", 0.0);
1022 set_state(PART:"label2", "default", 0.0);
1023 }
1024 } else if (m1 == (ICON)) {
1025 if (!d) {
1026 set_state(PART:"elm.swallow.icon", "icononly", 0.0);
1027 set_state(PART:"icon_clip", "default", 0.0);
1028 set_state(PART:"elm.text", "icononly", 0.0);
1029 set_state(PART:"label2", "icononly", 0.0);
1030 } else {
1031 set_state(PART:"elm.swallow.icon", "icononly", 0.0);
1032 set_state(PART:"icon_clip", "disabled", 0.0);
1033 set_state(PART:"elm.text", "icononly", 0.0);
1034 set_state(PART:"label2", "icononly", 0.0);
1035 }
1036 } else if (m1 == (LABEL)) {
1037 if (!d) {
1038 set_state(PART:"elm.swallow.icon", "noicon", 0.0);
1039 set_state(PART:"icon_clip", "default", 0.0);
1040 set_state(PART:"elm.text", "noicon", 0.0);
1041 set_state(PART:"label2", "noicon", 0.0);
1042 } else {
1043 set_state(PART:"elm.swallow.icon", "noicon", 0.0);
1044 set_state(PART:"icon_clip", "disabled", 0.0);
1045 set_state(PART:"elm.text", "noicon_disabled", 0.0);
1046 set_state(PART:"label2", "noicon_disabled", 0.0);
1047 }
1048 } else {
1049 if (!d) {
1050 set_state(PART:"elm.swallow.icon", "noicon", 0.0);
1051 set_state(PART:"icon_clip", "default", 0.0);
1052 set_state(PART:"elm.text", "noicon", 0.0);
1053 set_state(PART:"label2", "noicon", 0.0);
1054 } else {
1055 set_state(PART:"elm.swallow.icon", "noicon", 0.0);
1056 set_state(PART:"icon_clip", "disabled", 0.0);
1057 set_state(PART:"elm.text", "noicon_disabled", 0.0);
1058 set_state(PART:"label2", "noicon_disabled", 0.0);
1059 }
1060 }
1061 }
1062 }
997 parts { 1063 parts {
998 part { name: "elm.swallow.icon"; 1064 part { name: "base"; type: SPACER;
1065 description { state: "default" 0.0;
1066 }
1067 description { state: "vert" 0.0;
1068 rel1.offset: -1 0;
1069 rel2.offset: 0 -1;
1070 }
1071 }
1072 part { name: "shadow1"; mouse_events: 0;
1073 description { state: "default" 0.0;
1074 rel1.to: "base";
1075 rel2.to: "base";
1076 image.normal: "shadow_inset_bevels.png";
1077 image.border: 2 2 0 1;
1078 visible: 0;
1079 }
1080 description { state: "selected" 0.0;
1081 inherit: "default" 0.0;
1082 visible: 1;
1083 }
1084 }
1085 part { name: "shadow2"; mouse_events: 0;
1086 description { state: "default" 0.0;
1087 rel1.offset: 1 0;
1088 rel1.to: "shadow1";
1089 rel2.offset: -2 -1;
1090 rel2.to: "shadow1";
1091 image.normal: "shadow_angled_in_sides.png";
1092 image.border: 8 8 0 1;
1093 image.middle: 0;
1094 visible: 0;
1095 }
1096 description { state: "selected" 0.0;
1097 inherit: "default" 0.0;
1098 visible: 1;
1099 }
1100 }
1101 part { name: "bend_clip"; type: RECT;
1102 description { state: "default" 0.0;
1103 visible: 0;
1104 }
1105 description { state: "vert" 0.0;
1106 visible: 1;
1107 }
1108 }
1109 part { name: "bend";
1110 clip_to: "bend_clip";
1111 description { state: "default" 0.0;
1112 min: 2 2;
1113 max: 99999 2;
1114 rel2.offset: -1 1;
1115 rel2.relative: 1.0 0.0;
1116 image.normal: "bevel_dark_in.png";
1117 image.border: 2 2 2 2;
1118 fill.smooth: 0;
1119 visible: 0;
1120 fixed: 1 1;
1121 }
1122 description { state: "selected" 0.0;
1123 inherit: "default" 0.0;
1124 visible: 1;
1125 }
1126 }
1127
1128 part { name: "icon_clip"; type: RECT;
1129 description { state: "default" 0.0;
1130 }
1131 description { state: "disabled" 0.0;
1132 inherit: "default" 0.0;
1133 color: 255 255 255 64;
1134 }
1135 }
1136 part { name: "icon_clip1"; type: RECT;
1137 clip_to: "icon_clip";
1138 description { state: "default" 0.0;
1139 color: 255 255 255 255;
1140 visible: 1;
1141 }
1142 description { state: "animation" 0.0;
1143 inherit: "default" 0.0;
1144 color: 255 255 255 0;
1145 visible: 0;
1146 }
1147 }
1148 part { name: "elm.swallow.icon"; type: SWALLOW;
1149 clip_to: "icon_clip1";
999 description { state: "default" 0.0; 1150 description { state: "default" 0.0;
1000 fixed: 1 0; 1151 fixed: 1 0;
1001 aspect_preference: VERTICAL; 1152 aspect_preference: VERTICAL;
1002 align: 0.0 0.5; 1153 align: 0.0 0.5;
1003 rel1.offset: 2 2; 1154 rel2.to_y: "elm.text";
1004 rel2.relative: 0.0 1.0; 1155 rel2.relative: 0.0 1.0;
1005 rel2.offset: 2 -3; 1156 rel2.offset: 2 -3;
1006 } 1157 }
@@ -1019,11 +1170,25 @@ group { name: "elm/toolbar/item/item_horizontal";
1019 rel2.to_y: "icon_clip"; 1170 rel2.to_y: "icon_clip";
1020 } 1171 }
1021 } 1172 }
1022 part { name: "elm.swallow.icon_new"; 1173 part { name: "icon_clip2"; type: RECT;
1174 clip_to: "icon_clip";
1175 description { state: "default" 0.0;
1176 color: 255 255 255 0;
1177 visible: 0;
1178 }
1179 description { state: "animation" 0.0;
1180 inherit: "default" 0.0;
1181 color: 255 255 255 255;
1182 visible: 1;
1183 }
1184 }
1185 part { name: "elm.swallow.icon_new"; type: SWALLOW;
1186 clip_to: "icon_clip2";
1023 description { state: "default" 0.0; 1187 description { state: "default" 0.0;
1024 aspect_preference: VERTICAL; 1188 aspect_preference: VERTICAL;
1025 align: 0.0 0.5; 1189 align: 0.0 0.5;
1026 rel1.offset: 2 2; 1190 rel1.offset: 2 2;
1191 rel2.to_y: "elm.text";
1027 rel2.relative: 0.0 1.0; 1192 rel2.relative: 0.0 1.0;
1028 rel2.offset: 2 -3; 1193 rel2.offset: 2 -3;
1029 } 1194 }
@@ -1042,7 +1207,22 @@ group { name: "elm/toolbar/item/item_horizontal";
1042 rel2.to_y: "icon_clip"; 1207 rel2.to_y: "icon_clip";
1043 } 1208 }
1044 } 1209 }
1045 part { name: "elm.text"; 1210
1211 part { name: "text_clip1"; type: RECT;
1212 description { state: "default" 0.0;
1213 color: 255 255 255 255;
1214 visible: 1;
1215 }
1216 description { state: "animation" 0.0;
1217 inherit: "default" 0.0;
1218 color: 255 255 255 0;
1219 visible: 0;
1220 }
1221 }
1222 part { name: "elm.text"; type: TEXT; mouse_events: 0;
1223 effect: SHADOW BOTTOM;
1224 scale: 1;
1225 clip_to: "text_clip1";
1046 description { state: "default" 0.0; 1226 description { state: "default" 0.0;
1047 rel1.offset: 1 2; 1227 rel1.offset: 1 2;
1048 rel1.relative: 1.0 0.0; 1228 rel1.relative: 1.0 0.0;
@@ -1057,6 +1237,7 @@ group { name: "elm/toolbar/item/item_horizontal";
1057 align: 0.0 0.5; 1237 align: 0.0 0.5;
1058 text_class: "toolbar_item"; 1238 text_class: "toolbar_item";
1059 } 1239 }
1240 fixed: 0 1;
1060 } 1241 }
1061 description { state: "selected" 0.0; 1242 description { state: "selected" 0.0;
1062 inherit: "default" 0.0; 1243 inherit: "default" 0.0;
@@ -1072,8 +1253,9 @@ group { name: "elm/toolbar/item/item_horizontal";
1072 inherit: "default" 0.0; 1253 inherit: "default" 0.0;
1073 rel1.offset: 4 2; 1254 rel1.offset: 4 2;
1074 rel1.relative: 0.0 0.0; 1255 rel1.relative: 0.0 0.0;
1075 rel1.to: "icon_clip"; 1256 rel1.to: "base";
1076 align: 0.5 0.5; 1257 align: 0.5 0.5;
1258 fixed: 0 0;
1077 } 1259 }
1078 description { state: "noicon_disabled" 0.0; 1260 description { state: "noicon_disabled" 0.0;
1079 inherit: "noicon" 0.0; 1261 inherit: "noicon" 0.0;
@@ -1087,11 +1269,24 @@ group { name: "elm/toolbar/item/item_horizontal";
1087 fixed: 1 1; 1269 fixed: 1 1;
1088 } 1270 }
1089 } 1271 }
1090 part { name: "label2"; 1272 part { name: "label2"; type: TEXT; mouse_events: 0;
1273 effect: GLOW;
1274 scale: 1;
1275 clip_to: "text_clip1";
1091 description { state: "default" 0.0; 1276 description { state: "default" 0.0;
1092 rel1.offset: -2 -3; 1277 rel1.offset: -2 -3;
1093 text.align: 0.0 0.5; 1278 rel1.to: "elm.text";
1279 rel2.offset: 2 1;
1280 rel2.to: "elm.text";
1281 color: FN_COL_HIGHLIGHT;
1282 color_class: "toolbar_item_active";
1094 align: 0.0 0.5; 1283 align: 0.0 0.5;
1284 text { font: FN; size: 10;
1285 text_source: "elm.text";
1286 align: 0.0 0.5;
1287 text_class: "toolbar_item";
1288 }
1289 visible: 0;
1095 } 1290 }
1096 description { state: "selected" 0.0; 1291 description { state: "selected" 0.0;
1097 inherit: "default" 0.0; 1292 inherit: "default" 0.0;
@@ -1103,8 +1298,28 @@ group { name: "elm/toolbar/item/item_horizontal";
1103 description { state: "noicon_disabled" 0.0; 1298 description { state: "noicon_disabled" 0.0;
1104 inherit: "noicon" 0.0; 1299 inherit: "noicon" 0.0;
1105 } 1300 }
1301 description { state: "icononly" 0.0;
1302 inherit: "default" 0.0;
1303 text.min: 0 0;
1304 visible: 0;
1305 fixed: 1 1;
1306 }
1106 } 1307 }
1107 part { name: "elm.text_new"; 1308 part { name: "text_clip2"; type: RECT;
1309 description { state: "default" 0.0;
1310 color: 255 255 255 0;
1311 visible: 0;
1312 }
1313 description { state: "animation" 0.0;
1314 inherit: "default" 0.0;
1315 color: 255 255 255 255;
1316 visible: 1;
1317 }
1318 }
1319 part { name: "elm.text_new"; type: TEXT; mouse_events: 0;
1320 effect: SHADOW BOTTOM;
1321 scale: 1;
1322 clip_to: "text_clip2";
1108 description { state: "default" 0.0; 1323 description { state: "default" 0.0;
1109 rel1.offset: 1 2; 1324 rel1.offset: 1 2;
1110 rel1.relative: 1.0 0.0; 1325 rel1.relative: 1.0 0.0;
@@ -1119,6 +1334,7 @@ group { name: "elm/toolbar/item/item_horizontal";
1119 align: 0.0 0.5; 1334 align: 0.0 0.5;
1120 text_class: "toolbar_item"; 1335 text_class: "toolbar_item";
1121 } 1336 }
1337 fixed: 0 1;
1122 } 1338 }
1123 description { state: "selected" 0.0; 1339 description { state: "selected" 0.0;
1124 inherit: "default" 0.0; 1340 inherit: "default" 0.0;
@@ -1134,7 +1350,6 @@ group { name: "elm/toolbar/item/item_horizontal";
1134 inherit: "default" 0.0; 1350 inherit: "default" 0.0;
1135 rel1.offset: 4 2; 1351 rel1.offset: 4 2;
1136 rel1.relative: 0.0 0.0; 1352 rel1.relative: 0.0 0.0;
1137 rel1.to: "icon_clip";
1138 align: 0.5 0.5; 1353 align: 0.5 0.5;
1139 } 1354 }
1140 description { state: "noicon_disabled" 0.0; 1355 description { state: "noicon_disabled" 0.0;
@@ -1149,11 +1364,24 @@ group { name: "elm/toolbar/item/item_horizontal";
1149 fixed: 1 1; 1364 fixed: 1 1;
1150 } 1365 }
1151 } 1366 }
1152 part { name: "label2_new"; 1367 part { name: "label2_new"; type: TEXT; mouse_events: 0;
1368 effect: GLOW;
1369 scale: 1;
1370 clip_to: "text_clip2";
1153 description { state: "default" 0.0; 1371 description { state: "default" 0.0;
1154 rel1.offset: -2 -3;
1155 text.align: 0.0 0.5;
1156 align: 0.0 0.5; 1372 align: 0.0 0.5;
1373 rel1.offset: -2 -3;
1374 rel1.to: "elm.text";
1375 rel2.offset: 2 1;
1376 rel2.to: "elm.text";
1377 color: FN_COL_HIGHLIGHT;
1378 color_class: "toolbar_item_active";
1379 text { font: FN; size: 10;
1380 text_source: "elm.text";
1381 align: 0.0 0.5;
1382 text_class: "toolbar_item";
1383 }
1384 visible: 0;
1157 } 1385 }
1158 description { state: "selected" 0.0; 1386 description { state: "selected" 0.0;
1159 inherit: "default" 0.0; 1387 inherit: "default" 0.0;
@@ -1165,17 +1393,235 @@ group { name: "elm/toolbar/item/item_horizontal";
1165 description { state: "noicon_disabled" 0.0; 1393 description { state: "noicon_disabled" 0.0;
1166 inherit: "noicon" 0.0; 1394 inherit: "noicon" 0.0;
1167 } 1395 }
1396 description { state: "icononly" 0.0;
1397 inherit: "default" 0.0;
1398 text.min: 0 0;
1399 visible: 0;
1400 fixed: 1 1;
1401 }
1402 }
1403
1404 part { name: "bar"; mouse_events: 0;
1405 description { state: "default" 0.0;
1406 rel1.offset: -3 -7;
1407 rel1.relative: 0.0 1.0;
1408 rel1.to: "shadow2";
1409 rel2.offset: 2 2;
1410 rel2.to: "shadow2";
1411 image.normal: "horizontal_separated_bar_small_glow.png";
1412 image.border: 4 4 4 4;
1413 fill.smooth: 0;
1414 visible: 0;
1415 }
1416 description { state: "selected" 0.0;
1417 inherit: "default" 0.0;
1418 visible: 1;
1419 }
1420 }
1421 part { name: "highlight"; mouse_events: 0;
1422 description { state: "default" 0.0;
1423 rel1.offset: -3 -7;
1424 rel1.relative: 0.0 1.0;
1425 rel1.to: "shadow2";
1426 rel2.offset: 2 2;
1427 rel2.to: "shadow2";
1428 image.normal: "horizontal_separated_bar_small_glow.png";
1429 image.border: 4 4 4 4;
1430 fill.smooth: 0;
1431 visible: 0;
1432 }
1433 description { state: "selected" 0.0;
1434 inherit: "default" 0.0;
1435 visible: 1;
1436 }
1437 }
1438 part { name: "event"; type: RECT;
1439 ignore_flags: ON_HOLD;
1440 description { state: "default" 0.0;
1441 color: 0 0 0 0;
1442 }
1168 } 1443 }
1169 } 1444 }
1170} 1445 programs {
1446 program {
1447 signal: "elm,orient,horizontal"; source: "elm";
1448 action: STATE_SET "default" 0.0;
1449 target: "base";
1450 target: "bend_clip";
1451 }
1452 program {
1453 signal: "elm,orient,vertical"; source: "elm";
1454 action: STATE_SET "vert" 0.0;
1455 target: "base";
1456 target: "bend_clip";
1457 }
1458
1459 program { name: "st0";
1460 signal: "load"; source: "";
1461 script {
1462 set_int(btmode, LABEL | ICON);
1463 }
1464 }
1465
1466 program {
1467 signal: "elm,state,selected"; source: "elm";
1468 action: STATE_SET "selected" 0.0;
1469 target: "elm.text";
1470 target: "label2";
1471 target: "shadow1";
1472 target: "shadow2";
1473 target: "bar";
1474 target: "bend";
1475 }
1476 program {
1477 signal: "elm,state,unselected"; source: "elm";
1478 action: STATE_SET "default" 0.0;
1479 target: "elm.text";
1480 target: "label2";
1481 target: "shadow1";
1482 target: "shadow2";
1483 target: "bar";
1484 target: "bend";
1485 }
1486 program {
1487 signal: "mouse,up,1"; source: "event";
1488 action: SIGNAL_EMIT "elm,action,click" "elm";
1489 }
1490
1491 program {
1492 signal: "elm,highlight,on"; source: "elm";
1493 action: STATE_SET "selected" 0.0;
1494 target: "highlight";
1495 }
1496 program {
1497 signal: "elm,highlight,off"; source: "elm";
1498 action: STATE_SET "default" 0.0;
1499 target: "highlight";
1500 }
1501
1502 program {
1503 signal: "mouse,in"; source: "event";
1504 action: SIGNAL_EMIT "elm,mouse,in" "elm";
1505 }
1506 program { name: "mouse,out";
1507 signal: "mouse,out"; source: "event";
1508 action: SIGNAL_EMIT "elm,mouse,out" "elm";
1509 }
1510
1511 program { name: "st1";
1512 signal: "elm,text,hidden"; source: "elm";
1513 script {
1514 new m = get_int(btmode);
1515 m &= ~LABEL; set_int(btmode, m);
1516 eval_mode(m);
1517 }
1518 }
1519 program { name: "st2";
1520 signal: "elm,text,visible"; source: "elm";
1521 script {
1522 new m = get_int(btmode);
1523 m |= LABEL; set_int(btmode, m);
1524 eval_mode(m);
1525 }
1526 }
1527 program { name: "st3";
1528 signal: "elm,icon,hidden"; source: "elm";
1529 script {
1530 new m = get_int(btmode);
1531 m &= ~ICON; set_int(btmode, m);
1532 eval_mode(m);
1533 }
1534 }
1535 program { name: "st4";
1536 signal: "elm,icon,visible"; source: "elm";
1537 script {
1538 new m = get_int(btmode);
1539 m |= ICON; set_int(btmode, m);
1540 eval_mode(m);
1541 }
1542 }
1543 program { name: "st5";
1544 signal: "elm,state,disabled"; source: "elm";
1545 script {
1546 new m = get_int(btmode);
1547 m |= DISABLE; set_int(btmode, m);
1548 eval_mode(m);
1549 }
1550 }
1551 program { name: "st6";
1552 signal: "elm,state,enabled"; source: "elm";
1553 script {
1554 new m = get_int(btmode);
1555 m &= ~DISABLE; set_int(btmode, m);
1556 eval_mode(m);
1557 }
1558 }
1559
1560 program {
1561 signal: "elm,state,moving"; source: "elm";
1562 action: STATE_SET "default" 0.0;
1563 target: "shadow1";
1564 target: "shadow2";
1565 }
1566
1567 program {
1568 signal: "elm,state,icon_set,forward"; source: "elm";
1569 after: "icon_set,animation";
1570 }
1571 program {
1572 signal: "elm,state,icon_set,backward"; source: "elm";
1573 after: "icon_set,animation";
1574 }
1575 program { name: "icon_set,animation";
1576 signal: "elm,state,icon_set"; source: "elm";
1577 action: STATE_SET "animation" 0.0;
1578 target: "icon_clip1";
1579 target: "icon_clip2";
1580 transition: LINEAR 0.2;
1581 after: "icon_set,animation,done";
1582 }
1583 program { name: "icon_set,animation,done";
1584 action: SIGNAL_EMIT "elm,state,icon_set,done" "elm";
1585 }
1171 1586
1172// === item: style assumed to exist 1587 program {
1173// XXX: vert vs horiz (should emit) 1588 signal: "elm,state,icon,reset"; source: "elm";
1174// XXX: seriously... why do we have this style? 1589 action: STATE_SET "default" 0.0;
1175group { name: "elm/toolbar/item/item_centered"; 1590 target: "icon_clip1";
1176 inherit: "elm/toolbar/item/default"; 1591 target: "icon_clip2";
1177 parts { 1592 }
1593
1594 program {
1595 signal: "elm,state,label_set,forward"; source: "elm";
1596 after: "label_set,animation";
1597 }
1598 program {
1599 signal: "elm,state,label_set,backward"; source: "elm";
1600 after: "label_set,animation";
1601 }
1602 program { name: "label_set,animation";
1603 signal: "elm,state,label_set"; source: "elm";
1604 action: STATE_SET "animation" 0.0;
1605 target: "text_clip1";
1606 target: "text_clip2";
1607 transition: LINEAR 0.2;
1608 after: "label_set,animation,done";
1609 }
1610 program { name: "label_set,animation,done";
1611 action: SIGNAL_EMIT "elm,state,label_set,done" "elm";
1612 }
1613
1614 program {
1615 signal: "elm,state,label,reset"; source: "elm";
1616 action: STATE_SET "default" 0.0;
1617 target: "text_clip1";
1618 target: "text_clip2";
1619 }
1178 } 1620 }
1621#undef ICON
1622#undef LABEL
1623#undef MASK
1624#undef DISABLE
1179} 1625}
1180 1626
1181// === separator 1627// === separator
diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c
index 0061934ac..2e0d24223 100644
--- a/src/lib/elm_toolbar.c
+++ b/src/lib/elm_toolbar.c
@@ -2401,14 +2401,29 @@ _item_new(Evas_Object *obj,
2401 evas_object_size_hint_max_set(it->icon, sd->icon_size, sd->icon_size); 2401 evas_object_size_hint_max_set(it->icon, sd->icon_size, sd->icon_size);
2402 elm_layout_content_set(VIEW(it), "elm.swallow.icon", it->icon); 2402 elm_layout_content_set(VIEW(it), "elm.swallow.icon", it->icon);
2403 elm_layout_signal_emit(VIEW(it), "elm,state,icon,visible", "elm"); 2403 elm_layout_signal_emit(VIEW(it), "elm,state,icon,visible", "elm");
2404 elm_layout_signal_emit(VIEW(it), "elm,icon,visible", "elm");
2404 evas_object_show(it->icon); 2405 evas_object_show(it->icon);
2405 elm_widget_sub_object_add(obj, it->icon); 2406 elm_widget_sub_object_add(obj, it->icon);
2406 } 2407 }
2408 else
2409 {
2410 elm_layout_signal_emit(VIEW(it), "elm,state,icon,hidden", "elm");
2411 elm_layout_signal_emit(VIEW(it), "elm,icon,hidden", "elm");
2412 }
2413
2407 if (it->label) 2414 if (it->label)
2408 { 2415 {
2409 elm_layout_text_set(VIEW(it), "elm.text", it->label); 2416 elm_layout_text_set(VIEW(it), "elm.text", it->label);
2410 elm_layout_signal_emit(VIEW(it), "elm,state,text,visible", "elm"); 2417 elm_layout_signal_emit(VIEW(it), "elm,state,text,visible", "elm");
2418 elm_layout_signal_emit(VIEW(it), "elm,text,visible", "elm");
2411 } 2419 }
2420 else
2421 {
2422 elm_layout_signal_emit(VIEW(it), "elm,state,text,hidden", "elm");
2423 elm_layout_signal_emit(VIEW(it), "elm,text,hidden", "elm");
2424 }
2425
2426 edje_object_message_signal_process(elm_layout_edje_get(VIEW(it)));
2412 2427
2413 evas_object_event_callback_add 2428 evas_object_event_callback_add
2414 (VIEW(it), EVAS_CALLBACK_RESIZE, _item_resize, obj); 2429 (VIEW(it), EVAS_CALLBACK_RESIZE, _item_resize, obj);