summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2015-03-06 17:18:48 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-03-06 18:59:31 -0500
commit073bac747bac1bafd9fbae4a37280dcf12d40e76 (patch)
treefbf6cad01829c4beb1e3b28b191b4c99d1ae7bec
parent7d500e3331dfac4d2a5ec834e0fd5124529b075f (diff)
theme: Updated Ibar to align with the origin
This fixes partly T1828 Summary: Use the feature provided by ibar. Reviewers: raster, zmike Subscribers: zmike Differential Revision: https://phab.enlightenment.org/D1797
-rw-r--r--data/themes/edc/ibar-ibox.edc99
1 files changed, 81 insertions, 18 deletions
diff --git a/data/themes/edc/ibar-ibox.edc b/data/themes/edc/ibar-ibox.edc
index 77633ef36..fbd13c371 100644
--- a/data/themes/edc/ibar-ibox.edc
+++ b/data/themes/edc/ibar-ibox.edc
@@ -431,6 +431,31 @@ group { name: "e/modules/ibox/icon_overlay";
431 images.image: "darken_rounded_square.png" COMP; 431 images.image: "darken_rounded_square.png" COMP;
432 script { 432 script {
433 public urgent; 433 public urgent;
434 public origin;
435
436 public refresh_origin(){
437 new partid;
438
439 partid = get_part_id("e.text.label");
440 custom_state(partid, "default", 0.0);
441
442 if (get_int(origin) == 2){
443 //top
444 set_state_val(partid, STATE_ALIGNMENT, 0.5, 0.5);
445 }else if (get_int(origin) == 3){
446 //right
447 set_state_val(partid, STATE_ALIGNMENT, 0.0, 0.5);
448 }else if (get_int(origin) == 4){
449 //left
450 set_state_val(partid, STATE_ALIGNMENT, 1.0, 0.5);
451 }else{
452 //bottom
453 set_state_val(partid, STATE_ALIGNMENT, 0.5, 0.5);
454 }
455
456 /* apply the custom state */
457 set_state(partid, "custom", 0.0);
458 }
434 } 459 }
435 parts { 460 parts {
436 part { name: "item_clip"; type: RECT; 461 part { name: "item_clip"; type: RECT;
@@ -495,7 +520,19 @@ group { name: "e/modules/ibox/icon_overlay";
495 rel2.to: "background"; 520 rel2.to: "background";
496 } 521 }
497 } 522 }
523 part { name: "clipper"; type: RECT;
524 description{ state: "default" 0.0;
525 rel1.to: "bevel";
526 rel2.to: "bevel";
527 color: 255 255 255 0;
528 }
529 description{ state: "visible" 0.0;
530 inherit: "default" 0.0;
531 color: 255 255 255 255;
532 }
533 }
498 part { name: "bevel"; mouse_events: 0; 534 part { name: "bevel"; mouse_events: 0;
535 clip_to: "clipper";
499 description { state: "default" 0.0; 536 description { state: "default" 0.0;
500 rel1.offset: -10 -6; 537 rel1.offset: -10 -6;
501 rel1.to: "e.text.label"; 538 rel1.to: "e.text.label";
@@ -505,22 +542,29 @@ group { name: "e/modules/ibox/icon_overlay";
505 image.border: 15 15 15 15; 542 image.border: 15 15 15 15;
506 fill.smooth: 0; 543 fill.smooth: 0;
507 fixed: 1 1; 544 fixed: 1 1;
508 color: 255 255 255 0;
509 visible: 0;
510 } 545 }
511 description { state: "visible" 0.0; 546 }
512 inherit: "default" 0.0; 547 part { name: "spacer"; type: SPACER;
513 color: 255 255 255 255; 548 description { state: "default" 0.0;
514 visible: 1; 549 rel1.relative: 0.0 1.0;
550 rel2.relative: 1.0 1.0;
515 } 551 }
552 description { state: "visible" 0.0;
553 rel1.relative: 0.0 0.5;
554 rel2.relative: 1.0 0.5;
555 }
556
516 } 557 }
517 part { name: "e.text.label"; type: TEXT; mouse_events: 0; 558 part { name: "e.text.label"; type: TEXT; mouse_events: 0;
518 effect: SHADOW BOTTOM; 559 effect: SHADOW BOTTOM;
519 scale: 1; 560 scale: 1;
561 clip_to: "clipper";
520 description { state: "default" 0.0; 562 description { state: "default" 0.0;
521 rel1.relative: 0.0 1.0; 563 rel1.to: "spacer";
564 rel1.relative: 0.0 0.0;
565 rel2.to: "spacer";
522 rel2.relative: 1.0 1.0; 566 rel2.relative: 1.0 1.0;
523 color_class: "module_label_invisible"; 567 color_class: "module_label";
524 color3: 255 255 255 255; 568 color3: 255 255 255 255;
525 text { font: FN; size: 10; 569 text { font: FN; size: 10;
526 min: 1 1; 570 min: 1 1;
@@ -528,13 +572,7 @@ group { name: "e/modules/ibox/icon_overlay";
528 align: 0.5 0.5; 572 align: 0.5 0.5;
529 text_class: "module_normal"; 573 text_class: "module_normal";
530 } 574 }
531 } 575 align: 0.5 0.5;
532 description { state: "visible" 0.0;
533 inherit: "default" 0.0;
534 rel1.relative: 0.0 0.5;
535 rel2.relative: 1.0 0.5;
536 color_class: "module_label";
537 color3: 255 255 255 255;
538 } 576 }
539 } 577 }
540 } 578 }
@@ -574,14 +612,39 @@ group { name: "e/modules/ibox/icon_overlay";
574 signal: "e,action,show,label"; source: "e"; 612 signal: "e,action,show,label"; source: "e";
575 action: STATE_SET "visible" 0.0; 613 action: STATE_SET "visible" 0.0;
576 transition: SINUSOIDAL 0.5; 614 transition: SINUSOIDAL 0.5;
577 target: "e.text.label"; 615 target: "spacer";
578 target: "bevel"; 616 target: "clipper";
579 } 617 }
580 program { 618 program {
581 signal: "e,action,hide,label"; source: "e"; 619 signal: "e,action,hide,label"; source: "e";
582 action: STATE_SET "default" 0.0; 620 action: STATE_SET "default" 0.0;
583 transition: SINUSOIDAL 1.0; 621 transition: SINUSOIDAL 1.0;
584 target: "e.text.label"; 622 target: "spacer";
623 target: "clipper";
624 }
625#define ORIGIN_PRO(_NAME,_ID) \
626 program { \
627 signal: "e,origin,"_NAME; source: "e"; \
628 script { \
629 set_int(origin, _ID); \
630 refresh_origin(); \
631 } \
632 }
633
634 ORIGIN_PRO("bottom", 1)
635 ORIGIN_PRO("top", 2);
636 ORIGIN_PRO("right", 3);
637 ORIGIN_PRO("left", 4);
638
639#undef ORIGIN_PRO
640 program { name: "show_bevel";
641 action: STATE_SET visible 0.0;
642 transition: SINUSOIDAL 1.0;
643 target: "bevel";
644 }
645 program { name: "hide_bevel";
646 action: STATE_SET default 0.0;
647 transition: SINUSOIDAL 1.0;
585 target: "bevel"; 648 target: "bevel";
586 } 649 }
587 program { name: "go_passive2"; 650 program { name: "go_passive2";