summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrii Kroitor <an.kroitor@samsung.com>2014-02-08 13:08:02 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-02-08 13:13:45 +0900
commit81403f449482cb5aa20ce2003f46ddd542fab5d5 (patch)
tree84cdb46b041f1753cd4dfcd4a53bbc31a79fb429
parent0b1fbd9cafab0491969db39a4016c5fe904350de (diff)
Elmementary menu styling fixed
Summary: When custom style is applyed to menu the same style will be applyed to its internal hover object. Moved hover styles used by menu from hover.edc to menu.edc Reviewers: cedric, seoz, raster Reviewed By: raster CC: reutskiy.v.v Differential Revision: https://phab.enlightenment.org/D514
-rw-r--r--data/themes/edc/elm/hover.edc449
-rw-r--r--data/themes/edc/elm/menu.edc450
-rw-r--r--src/lib/elm_menu.c28
3 files changed, 471 insertions, 456 deletions
diff --git a/data/themes/edc/elm/hover.edc b/data/themes/edc/elm/hover.edc
index b8f706ca2..33f891fc6 100644
--- a/data/themes/edc/elm/hover.edc
+++ b/data/themes/edc/elm/hover.edc
@@ -423,455 +423,6 @@ group { name: "elm/hover/base/popout";
423 } 423 }
424} 424}
425 425
426//In the hover used by the menu only the bottom part is used.
427group { name: "elm/hover/base/menu";
428 images {
429 image: "vgrad_med_lighter.png" COMP;
430 image: "bevel_out.png" COMP;
431 image: "shine.png" COMP;
432 image: "win_shadow.png" COMP;
433 }
434 parts {
435 part { name: "elm.swallow.offset"; type: SWALLOW;
436 description { state: "default" 0.0;
437 align: 0.0 0.0;
438 rel1.relative: 0.0 0.0;
439 rel2.relative: 0.0 0.0;
440 }
441 }
442 part { name: "elm.swallow.size"; type: SWALLOW;
443 description { state: "default" 0.0;
444 align: 0.0 0.0;
445 rel1.to: "elm.swallow.offset";
446 rel1.relative: 1.0 1.0;
447 rel2.to: "elm.swallow.offset";
448 rel2.relative: 1.0 1.0;
449 }
450 }
451 part { name: "base"; type: RECT; repeat_events: 1;
452 description { state: "default" 0.0;
453 color: 0 0 0 0;
454 }
455 }
456 part { name: "elm.swallow.slot.left"; type: SWALLOW;
457 description { state: "default" 0.0;
458 }
459 }
460 part { name: "elm.swallow.slot.right"; type: SWALLOW;
461 description { state: "default" 0.0;
462 }
463 }
464 part { name: "elm.swallow.slot.top"; type: SWALLOW;
465 description { state: "default" 0.0;
466 }
467 description { state: "visible" 0.0;
468 inherit: "default" 0.0;
469 }
470 }
471 part { name: "bottomclip"; type: RECT;
472 description { state: "default" 0.0;
473 color: 255 255 255 0;
474 }
475 description { state: "visible" 0.0;
476 inherit: "default" 0.0;
477 color: 255 255 255 255;
478 }
479 }
480 part { name: "shadow";
481 clip_to: "bottomclip";
482 description { state: "default" 0.0;
483 image.normal: "win_shadow.png";
484 image.border: 14 14 14 14;
485 image.middle: 0;
486 rel1.to: "bottom";
487 rel1.offset: -7 -3;
488 rel2.to: "bottom";
489 rel2.offset: 6 11;
490 fill.smooth: 0;
491 }
492 }
493 part { name: "top";
494 clip_to: "bottomclip";
495 description { state: "default" 0.0;
496 image.normal: "vgrad_med_lighter.png";
497 rel1.to: "bottom";
498 rel2.to_x: "bottom";
499 rel2.to_y: "shine";
500 rel2.offset: -1 0;
501 min: 0 23;
502 align: 0.0 0.0;
503 fill.smooth: 0;
504 TILED_HORIZ(120)
505 fixed: 0 1;
506 }
507 description { state: "visible" 0.0;
508 inherit: "default" 0.0;
509 }
510 }
511 part { name: "bg"; type: RECT; mouse_events: 0;
512 clip_to: "bottomclip";
513 description { state: "default" 0.0;
514 rel1.to_x: "bottom";
515 rel1.to_y: "top";
516 rel1.relative: 0.0 1.0;
517 rel2.to: "bottom";
518 color: 64 64 64 255;
519 }
520 }
521
522 part { name: "bottom";
523 clip_to: "bottomclip";
524 description { state: "default" 0.0;
525 rel1.to: "elm.swallow.slot.bottom";
526 rel1.offset: 0 -5;
527 rel2.to: "elm.swallow.slot.bottom";
528 rel2.offset: -1 4;
529 image.normal: "bevel_out.png";
530 image.border: 1 1 1 1;
531 image.middle: 0;
532 fill.smooth: 0;
533 }
534 description { state: "visible" 0.0;
535 inherit: "default" 0.0;
536 }
537 }
538 part { name: "elm.swallow.slot.bottom"; type: SWALLOW;
539 clip_to: "bottomclip";
540 description { state: "default" 0.0;
541 align: 0.5 0.0;
542 rel1.to: "elm.swallow.slot.middle";
543 rel1.relative: 0.0 1.0;
544 rel1.offset: 0 0;
545 rel2.to: "elm.swallow.slot.middle";
546 rel2.relative: 1.0 1.0;
547 rel2.offset: -1 0;
548 }
549 description { state: "visible" 0.0;
550 inherit: "default" 0.0;
551 }
552 }
553 part { name: "bevel"; mouse_events: 0;
554 description { state: "default" 0.0;
555 rel1.to: "bottom";
556 rel2.to: "bottom";
557 image.normal: "bevel_out.png";
558 image.border: 1 1 1 1;
559 image.middle: 0;
560 fill.smooth: 0;
561 }
562 }
563 part { name: "shine"; mouse_events: 1;
564 repeat_events:1;
565 description { state: "default" 0.0;
566 rel1.to: "bottom";
567 rel1.offset: 0 -2;
568 rel2.to: "bottom";
569 rel2.relative: 1.0 0.0;
570 rel2.offset: -1 2;
571 image.normal: "shine.png";
572 FIXED_SIZE(69, 5)
573 }
574 }
575 part { name: "elm.swallow.slot.middle"; type: SWALLOW;
576 repeat_events:1;
577 description { state: "default" 0.0;
578 rel1.to: "elm.swallow.size";
579 rel2.to: "elm.swallow.size";
580 }
581 }
582 }
583 programs {
584 program { name: "end";
585 signal: "mouse,up,1"; source: "base";
586 action: SIGNAL_EMIT "elm,action,dismiss" "elm";
587 }
588 program { name: "bottomshow";
589 signal: "elm,action,slot,bottom,show"; source: "elm";
590 action: STATE_SET "visible" 0.0;
591 transition: DECELERATE 0.5;
592 target: "bottomclip";
593 target: "bottom";
594 target: "elm.swallow.slot.bottom";
595 }
596 program { name: "bottomhide";
597 signal: "elm,action,slot,bottom,hide"; source: "elm";
598 action: STATE_SET "default" 0.0;
599 transition: DECELERATE 0.5;
600 target: "bottomclip";
601 target: "bottom";
602 target: "elm.swallow.slot.bottom";
603 }
604 }
605}
606
607//In the hover used by the submenu only the bottom part is used
608//and no part should interact except the bottom area
609group { name: "elm/hover/base/submenu";
610 inherit: "elm/hover/base/menu";
611 images {
612 image: "vgrad_med.png" COMP;
613 }
614 parts {
615 part { name: "elm.swallow.offset";
616 repeat_events: 1;
617 }
618 //here we don't catch events like the hover does
619 part { name: "base"; type: RECT; repeat_events: 1;
620 description { state: "visible" 0.0;
621 color: 0 0 0 0;
622 visible: 0;
623 }
624 }
625 }
626}
627
628group { name: "elm/hover/base/main_menu";
629 images.image: "vgrad_med_lighter.png" COMP;
630 images.image: "bevel_dark_out.png" COMP;
631 parts {
632 part { name: "elm.swallow.offset"; type: SWALLOW;
633 description { state: "default" 0.0;
634 visible: 0;
635 fixed: 1 1;
636 }
637 }
638 part { name: "elm.swallow.size"; type: SWALLOW;
639 description { state: "default" 0.0;
640 align: 0.0 0.0;
641 rel2.relative: 0.0 0.0;
642 rel1.offset: 0 0;
643 fixed: 1 1;
644 }
645 }
646 part { name: "bottomclip"; type: RECT;
647 description { state: "default" 0.0;
648 rel1.offset: -1 -2;
649 }
650 }
651 part { name: "base";
652 description { state: "default" 0.0;
653 image.normal: "vgrad_med_lighter.png";
654 rel1.to_y: "bottom";
655 rel2.to_y: "bottom";
656 fill.smooth: 0;
657 TILED_HORIZ(120)
658 }
659 }
660 part { name: "bevel"; mouse_events: 0;
661 description { state: "default" 0.0;
662 rel1.to: "base";
663 rel2.to: "base";
664 image.normal: "bevel_dark_out.png";
665 image.border: 1 1 1 1;
666 image.middle: 0;
667 fill.smooth: 0;
668 }
669 }
670 part { name: "bottom"; type: RECT;
671 clip_to: "bottomclip";
672 description { state: "default" 0.0;
673 visible: 0;
674 rel1.to: "elm.swallow.slot.bottom";
675 rel1.offset: 0 0;
676 rel2.to: "elm.swallow.slot.bottom";
677 rel2.offset: -1 -1;
678 }
679 }
680 part { name: "elm.swallow.slot.bottom"; type: SWALLOW;
681 clip_to: "bottomclip";
682 description { state: "default" 0.0;
683 align: 0.5 0.0;
684 rel1.to: "elm.swallow.size";
685 rel1.relative: 0.0 1.0;
686 rel2.to: "elm.swallow.size";
687 fixed: 1 0;
688 }
689 description { state: "visible" 0.0;
690 inherit: "default" 0.0;
691 }
692 }
693 }
694 programs {
695 program { name: "bottomshow";
696 signal: "elm,action,slot,bottom,show"; source: "elm";
697 action: STATE_SET "visible" 0.0;
698 transition: DECELERATE 0.3;
699 target: "elm.swallow.slot.bottom";
700 }
701 }
702}
703
704group { name: "elm/hover/base/main_menu_submenu";
705 images.image: "vgrad_med_lighter.png" COMP;
706 images.image: "bevel_out.png" COMP;
707 images.image: "shine.png" COMP;
708 images.image: "win_shadow.png" COMP;
709 parts {
710 part { name: "elm.swallow.offset"; type: SWALLOW;
711 repeat_events:1;
712 description { state: "default" 0.0;
713 align: 0.0 0.0;
714 rel2.relative: 0.0 0.0;
715 }
716 }
717 part { name: "elm.swallow.size"; type: SWALLOW;
718 description { state: "default" 0.0;
719 align: 0.0 0.0;
720 rel1.to: "elm.swallow.offset";
721 rel1.relative: 1.0 1.0;
722 rel2.to: "elm.swallow.offset";
723 }
724 }
725 part { name: "base"; type: RECT; repeat_events: 1;
726 description { state: "default" 0.0;
727 color: 0 0 0 0;
728 }
729 }
730 part { name: "bottomclip"; type: RECT;
731 description { state: "default" 0.0;
732 rel1.to_y: "pop";
733 rel1.relative: 0.0 1.0;
734 rel1.offset: -1 -2;
735 }
736 }
737 part { name: "shadow";
738 clip_to: "bottomclip";
739 description { state: "default" 0.0;
740 image.normal: "win_shadow.png";
741 image.border: 14 14 14 14;
742 image.middle: 0;
743 rel1.to: "bottom";
744 rel1.offset: -7 -3;
745 rel2.to: "bottom";
746 rel2.offset: 6 11;
747 fill.smooth: 0;
748 }
749 }
750 part { name: "top";
751 clip_to: "bottomclip";
752 description { state: "default" 0.0;
753 image.normal: "vgrad_med_lighter.png";
754 rel1.to: "bottom";
755 rel2.to_x: "bottom";
756 rel2.to_y: "shine";
757 rel2.offset: -1 0;
758 min: 0 23;
759 align: 0.0 0.0;
760 fill.smooth: 0;
761 TILED_HORIZ(120)
762 fixed: 0 1;
763 }
764 description { state: "visible" 0.0;
765 inherit: "default" 0.0;
766 }
767 }
768 part { name: "bg"; type: RECT; mouse_events: 0;
769 clip_to: "bottomclip";
770 description { state: "default" 0.0;
771 rel1.to_x: "bottom";
772 rel1.to_y: "top";
773 rel1.relative: 0.0 1.0;
774 rel2.to: "bottom";
775 color: 64 64 64 255;
776 }
777 }
778 part { name: "bottom";
779 clip_to: "bottomclip";
780 description { state: "default" 0.0;
781 rel1.to: "elm.swallow.slot.bottom";
782 rel1.offset: 0 -6;
783 rel2.to: "elm.swallow.slot.bottom";
784 rel2.offset: -1 4;
785 image.normal: "bevel_out.png";
786 image.border: 1 1 1 1;
787 image.middle: 0;
788 fill.smooth: 0;
789 }
790 description { state: "visible" 0.0;
791 inherit: "default" 0.0;
792 }
793 }
794 part { name: "elm.swallow.slot.bottom"; type: SWALLOW;
795 clip_to: "bottomclip";
796 description { state: "default" 0.0;
797 align: 0.5 1.0;
798 rel1.to: "elm.swallow.slot.middle";
799 rel1.relative: 0.0 1.0;
800 rel1.offset: 0 0;
801 rel2.to: "elm.swallow.slot.middle";
802 rel2.relative: 1.0 1.0;
803 rel2.offset: -1 0;
804 }
805 description { state: "visible" 0.0;
806 inherit: "default" 0.0;
807 rel1.offset: 0 6;
808 rel2.offset: -1 6;
809 align: 0.5 0.0;
810 }
811 }
812 part { name: "pop"; type: RECT; mouse_events: 1;
813 repeat_events:1;
814 description { state: "default" 0.0;
815 rel1.to: "elm.swallow.slot.middle";
816 rel1.offset: 0 0;
817 rel2.to: "elm.swallow.slot.middle";
818 rel1.relative: 0.0 1.0;
819 rel2.offset: -1 0;
820 visible: 0;
821 }
822 }
823 part { name: "shine"; mouse_events: 0;
824 clip_to: "bottomclip";
825 description { state: "default" 0.0;
826 rel1.to: "bottom";
827 rel1.offset: 0 -2;
828 rel2.to: "bottom";
829 rel2.relative: 1.0 0.0;
830 rel2.offset: -1 2;
831 image.normal: "shine.png";
832 FIXED_SIZE(69, 5)
833 }
834 }
835 part { name: "elm.swallow.slot.middle"; type: SWALLOW;
836 repeat_events:1;
837 description { state: "default" 0.0;
838 rel1.to: "elm.swallow.size";
839 rel2.to: "elm.swallow.size";
840 }
841 }
842 }
843 programs {
844 program { name: "end";
845 signal: "mouse,up,1"; source: "base";
846 action: SIGNAL_EMIT "elm,action,dismiss" "elm";
847 }
848 program { name: "show";
849 signal: "elm,action,show"; source: "elm";
850 action: STATE_SET "visible" 0.0;
851 target: "base";
852 }
853 program { name: "hide";
854 signal: "elm,action,hide"; source: "elm";
855 action: STATE_SET "default" 0.0;
856 target: "base";
857 }
858 program { name: "bottomshow";
859 signal: "elm,action,slot,bottom,show"; source: "elm";
860 action: STATE_SET "visible" 0.0;
861 transition: DECELERATE 0.3;
862 target: "bottom";
863 target: "elm.swallow.slot.bottom";
864 }
865 program { name: "bottomhide";
866 signal: "elm,action,slot,bottom,hide"; source: "elm";
867 action: STATE_SET "default" 0.0;
868 transition: DECELERATE 0.5;
869 target: "bottom";
870 target: "elm.swallow.slot.bottom";
871 }
872 }
873}
874
875group { name: "elm/hover/base/hoversel_vertical/default"; 426group { name: "elm/hover/base/hoversel_vertical/default";
876 alias: "elm/hover/base/hoversel_vertical/entry"; 427 alias: "elm/hover/base/hoversel_vertical/entry";
877 images.image: "button_normal.png" COMP; 428 images.image: "button_normal.png" COMP;
diff --git a/data/themes/edc/elm/menu.edc b/data/themes/edc/elm/menu.edc
index 369c5ab7c..d180c5804 100644
--- a/data/themes/edc/elm/menu.edc
+++ b/data/themes/edc/elm/menu.edc
@@ -688,3 +688,453 @@ group { name: "elm/menu/main_menu_submenu/default";
688 } 688 }
689 } 689 }
690} 690}
691/*
692//In the hover used by the menu only the bottom part is used.
693group { name: "elm/hover/base/menu/default";
694 images {
695 image: "vgrad_med_lighter.png" COMP;
696 image: "bevel_out.png" COMP;
697 image: "shine.png" COMP;
698 image: "win_shadow.png" COMP;
699 }
700 parts {
701 part { name: "elm.swallow.offset"; type: SWALLOW;
702 description { state: "default" 0.0;
703 align: 0.0 0.0;
704 rel1.relative: 0.0 0.0;
705 rel2.relative: 0.0 0.0;
706 }
707 }
708 part { name: "elm.swallow.size"; type: SWALLOW;
709 description { state: "default" 0.0;
710 align: 0.0 0.0;
711 rel1.to: "elm.swallow.offset";
712 rel1.relative: 1.0 1.0;
713 rel2.to: "elm.swallow.offset";
714 rel2.relative: 1.0 1.0;
715 }
716 }
717 part { name: "base"; type: RECT; repeat_events: 1;
718 description { state: "default" 0.0;
719 color: 0 0 0 0;
720 }
721 }
722 part { name: "elm.swallow.slot.left"; type: SWALLOW;
723 description { state: "default" 0.0;
724 }
725 }
726 part { name: "elm.swallow.slot.right"; type: SWALLOW;
727 description { state: "default" 0.0;
728 }
729 }
730 part { name: "elm.swallow.slot.top"; type: SWALLOW;
731 description { state: "default" 0.0;
732 }
733 description { state: "visible" 0.0;
734 inherit: "default" 0.0;
735 }
736 }
737 part { name: "bottomclip"; type: RECT;
738 description { state: "default" 0.0;
739 color: 255 255 255 0;
740 }
741 description { state: "visible" 0.0;
742 inherit: "default" 0.0;
743 color: 255 255 255 255;
744 }
745 }
746 part { name: "shadow";
747 clip_to: "bottomclip";
748 description { state: "default" 0.0;
749 image.normal: "win_shadow.png";
750 image.border: 14 14 14 14;
751 image.middle: 0;
752 rel1.to: "bottom";
753 rel1.offset: -7 -3;
754 rel2.to: "bottom";
755 rel2.offset: 6 11;
756 fill.smooth: 0;
757 }
758 }
759 part { name: "top";
760 clip_to: "bottomclip";
761 description { state: "default" 0.0;
762 image.normal: "vgrad_med_lighter.png";
763 rel1.to: "bottom";
764 rel2.to_x: "bottom";
765 rel2.to_y: "shine";
766 rel2.offset: -1 0;
767 min: 0 23;
768 align: 0.0 0.0;
769 fill.smooth: 0;
770 TILED_HORIZ(120)
771 fixed: 0 1;
772 }
773 description { state: "visible" 0.0;
774 inherit: "default" 0.0;
775 }
776 }
777 part { name: "bg"; type: RECT; mouse_events: 0;
778 clip_to: "bottomclip";
779 description { state: "default" 0.0;
780 rel1.to_x: "bottom";
781 rel1.to_y: "top";
782 rel1.relative: 0.0 1.0;
783 rel2.to: "bottom";
784 color: 64 64 64 255;
785 }
786 }
787
788 part { name: "bottom";
789 clip_to: "bottomclip";
790 description { state: "default" 0.0;
791 rel1.to: "elm.swallow.slot.bottom";
792 rel1.offset: 0 -5;
793 rel2.to: "elm.swallow.slot.bottom";
794 rel2.offset: -1 4;
795 image.normal: "bevel_out.png";
796 image.border: 1 1 1 1;
797 image.middle: 0;
798 fill.smooth: 0;
799 }
800 description { state: "visible" 0.0;
801 inherit: "default" 0.0;
802 }
803 }
804 part { name: "elm.swallow.slot.bottom"; type: SWALLOW;
805 clip_to: "bottomclip";
806 description { state: "default" 0.0;
807 align: 0.5 0.0;
808 rel1.to: "elm.swallow.slot.middle";
809 rel1.relative: 0.0 1.0;
810 rel1.offset: 0 0;
811 rel2.to: "elm.swallow.slot.middle";
812 rel2.relative: 1.0 1.0;
813 rel2.offset: -1 0;
814 }
815 description { state: "visible" 0.0;
816 inherit: "default" 0.0;
817 }
818 }
819 part { name: "bevel"; mouse_events: 0;
820 description { state: "default" 0.0;
821 rel1.to: "bottom";
822 rel2.to: "bottom";
823 image.normal: "bevel_out.png";
824 image.border: 1 1 1 1;
825 image.middle: 0;
826 fill.smooth: 0;
827 }
828 }
829 part { name: "shine"; mouse_events: 1;
830 repeat_events:1;
831 description { state: "default" 0.0;
832 rel1.to: "bottom";
833 rel1.offset: 0 -2;
834 rel2.to: "bottom";
835 rel2.relative: 1.0 0.0;
836 rel2.offset: -1 2;
837 image.normal: "shine.png";
838 FIXED_SIZE(69, 5)
839 }
840 }
841 part { name: "elm.swallow.slot.middle"; type: SWALLOW;
842 repeat_events:1;
843 description { state: "default" 0.0;
844 rel1.to: "elm.swallow.size";
845 rel2.to: "elm.swallow.size";
846 }
847 }
848 }
849 programs {
850 program { name: "end";
851 signal: "mouse,up,1"; source: "base";
852 action: SIGNAL_EMIT "elm,action,dismiss" "elm";
853 }
854 program { name: "bottomshow";
855 signal: "elm,action,slot,bottom,show"; source: "elm";
856 action: STATE_SET "visible" 0.0;
857 transition: DECELERATE 0.5;
858 target: "bottomclip";
859 target: "bottom";
860 target: "elm.swallow.slot.bottom";
861 }
862 program { name: "bottomhide";
863 signal: "elm,action,slot,bottom,hide"; source: "elm";
864 action: STATE_SET "default" 0.0;
865 transition: DECELERATE 0.5;
866 target: "bottomclip";
867 target: "bottom";
868 target: "elm.swallow.slot.bottom";
869 }
870 }
871}
872
873//In the hover used by the submenu only the bottom part is used
874//and no part should interact except the bottom area
875group { name: "elm/hover/base/submenu/default";
876 inherit: "elm/hover/base/menu/default";
877 images {
878 image: "vgrad_med.png" COMP;
879 }
880 parts {
881 part { name: "elm.swallow.offset";
882 repeat_events: 1;
883 }
884 //here we don't catch events like the hover does
885 part { name: "base"; type: RECT; repeat_events: 1;
886 description { state: "visible" 0.0;
887 color: 0 0 0 0;
888 visible: 0;
889 }
890 }
891 }
892}
893
894group { name: "elm/hover/base/main_menu/default";
895 images.image: "vgrad_med_lighter.png" COMP;
896 images.image: "bevel_dark_out.png" COMP;
897 parts {
898 part { name: "elm.swallow.offset"; type: SWALLOW;
899 description { state: "default" 0.0;
900 visible: 0;
901 fixed: 1 1;
902 }
903 }
904 part { name: "elm.swallow.size"; type: SWALLOW;
905 description { state: "default" 0.0;
906 align: 0.0 0.0;
907 rel2.relative: 0.0 0.0;
908 rel1.offset: 0 0;
909 fixed: 1 1;
910 }
911 }
912 part { name: "bottomclip"; type: RECT;
913 description { state: "default" 0.0;
914 rel1.offset: -1 -2;
915 }
916 }
917 part { name: "base";
918 description { state: "default" 0.0;
919 image.normal: "vgrad_med_lighter.png";
920 rel1.to_y: "bottom";
921 rel2.to_y: "bottom";
922 fill.smooth: 0;
923 TILED_HORIZ(120)
924 }
925 }
926 part { name: "bevel"; mouse_events: 0;
927 description { state: "default" 0.0;
928 rel1.to: "base";
929 rel2.to: "base";
930 image.normal: "bevel_dark_out.png";
931 image.border: 1 1 1 1;
932 image.middle: 0;
933 fill.smooth: 0;
934 }
935 }
936 part { name: "bottom"; type: RECT;
937 clip_to: "bottomclip";
938 description { state: "default" 0.0;
939 visible: 0;
940 rel1.to: "elm.swallow.slot.bottom";
941 rel1.offset: 0 0;
942 rel2.to: "elm.swallow.slot.bottom";
943 rel2.offset: -1 -1;
944 }
945 }
946 part { name: "elm.swallow.slot.bottom"; type: SWALLOW;
947 clip_to: "bottomclip";
948 description { state: "default" 0.0;
949 align: 0.5 0.0;
950 rel1.to: "elm.swallow.size";
951 rel1.relative: 0.0 1.0;
952 rel2.to: "elm.swallow.size";
953 fixed: 1 0;
954 }
955 description { state: "visible" 0.0;
956 inherit: "default" 0.0;
957 }
958 }
959 }
960 programs {
961 program { name: "bottomshow";
962 signal: "elm,action,slot,bottom,show"; source: "elm";
963 action: STATE_SET "visible" 0.0;
964 transition: DECELERATE 0.3;
965 target: "elm.swallow.slot.bottom";
966 }
967 }
968}
969
970group { name: "elm/hover/base/main_menu_submenu/default";
971 images.image: "vgrad_med_lighter.png" COMP;
972 images.image: "bevel_out.png" COMP;
973 images.image: "shine.png" COMP;
974 images.image: "win_shadow.png" COMP;
975 parts {
976 part { name: "elm.swallow.offset"; type: SWALLOW;
977 repeat_events:1;
978 description { state: "default" 0.0;
979 align: 0.0 0.0;
980 rel2.relative: 0.0 0.0;
981 }
982 }
983 part { name: "elm.swallow.size"; type: SWALLOW;
984 description { state: "default" 0.0;
985 align: 0.0 0.0;
986 rel1.to: "elm.swallow.offset";
987 rel1.relative: 1.0 1.0;
988 rel2.to: "elm.swallow.offset";
989 }
990 }
991 part { name: "base"; type: RECT; repeat_events: 1;
992 description { state: "default" 0.0;
993 color: 0 0 0 0;
994 }
995 }
996 part { name: "bottomclip"; type: RECT;
997 description { state: "default" 0.0;
998 rel1.to_y: "pop";
999 rel1.relative: 0.0 1.0;
1000 rel1.offset: -1 -2;
1001 }
1002 }
1003 part { name: "shadow";
1004 clip_to: "bottomclip";
1005 description { state: "default" 0.0;
1006 image.normal: "win_shadow.png";
1007 image.border: 14 14 14 14;
1008 image.middle: 0;
1009 rel1.to: "bottom";
1010 rel1.offset: -7 -3;
1011 rel2.to: "bottom";
1012 rel2.offset: 6 11;
1013 fill.smooth: 0;
1014 }
1015 }
1016 part { name: "top";
1017 clip_to: "bottomclip";
1018 description { state: "default" 0.0;
1019 image.normal: "vgrad_med_lighter.png";
1020 rel1.to: "bottom";
1021 rel2.to_x: "bottom";
1022 rel2.to_y: "shine";
1023 rel2.offset: -1 0;
1024 min: 0 23;
1025 align: 0.0 0.0;
1026 fill.smooth: 0;
1027 TILED_HORIZ(120)
1028 fixed: 0 1;
1029 }
1030 description { state: "visible" 0.0;
1031 inherit: "default" 0.0;
1032 }
1033 }
1034 part { name: "bg"; type: RECT; mouse_events: 0;
1035 clip_to: "bottomclip";
1036 description { state: "default" 0.0;
1037 rel1.to_x: "bottom";
1038 rel1.to_y: "top";
1039 rel1.relative: 0.0 1.0;
1040 rel2.to: "bottom";
1041 color: 64 64 64 255;
1042 }
1043 }
1044 part { name: "bottom";
1045 clip_to: "bottomclip";
1046 description { state: "default" 0.0;
1047 rel1.to: "elm.swallow.slot.bottom";
1048 rel1.offset: 0 -6;
1049 rel2.to: "elm.swallow.slot.bottom";
1050 rel2.offset: -1 4;
1051 image.normal: "bevel_out.png";
1052 image.border: 1 1 1 1;
1053 image.middle: 0;
1054 fill.smooth: 0;
1055 }
1056 description { state: "visible" 0.0;
1057 inherit: "default" 0.0;
1058 }
1059 }
1060 part { name: "elm.swallow.slot.bottom"; type: SWALLOW;
1061 clip_to: "bottomclip";
1062 description { state: "default" 0.0;
1063 align: 0.5 1.0;
1064 rel1.to: "elm.swallow.slot.middle";
1065 rel1.relative: 0.0 1.0;
1066 rel1.offset: 0 0;
1067 rel2.to: "elm.swallow.slot.middle";
1068 rel2.relative: 1.0 1.0;
1069 rel2.offset: -1 0;
1070 }
1071 description { state: "visible" 0.0;
1072 inherit: "default" 0.0;
1073 rel1.offset: 0 6;
1074 rel2.offset: -1 6;
1075 align: 0.5 0.0;
1076 }
1077 }
1078 part { name: "pop"; type: RECT; mouse_events: 1;
1079 repeat_events:1;
1080 description { state: "default" 0.0;
1081 rel1.to: "elm.swallow.slot.middle";
1082 rel1.offset: 0 0;
1083 rel2.to: "elm.swallow.slot.middle";
1084 rel1.relative: 0.0 1.0;
1085 rel2.offset: -1 0;
1086 visible: 0;
1087 }
1088 }
1089 part { name: "shine"; mouse_events: 0;
1090 clip_to: "bottomclip";
1091 description { state: "default" 0.0;
1092 rel1.to: "bottom";
1093 rel1.offset: 0 -2;
1094 rel2.to: "bottom";
1095 rel2.relative: 1.0 0.0;
1096 rel2.offset: -1 2;
1097 image.normal: "shine.png";
1098 FIXED_SIZE(69, 5)
1099 }
1100 }
1101 part { name: "elm.swallow.slot.middle"; type: SWALLOW;
1102 repeat_events:1;
1103 description { state: "default" 0.0;
1104 rel1.to: "elm.swallow.size";
1105 rel2.to: "elm.swallow.size";
1106 }
1107 }
1108 }
1109 programs {
1110 program { name: "end";
1111 signal: "mouse,up,1"; source: "base";
1112 action: SIGNAL_EMIT "elm,action,dismiss" "elm";
1113 }
1114 program { name: "show";
1115 signal: "elm,action,show"; source: "elm";
1116 action: STATE_SET "visible" 0.0;
1117 target: "base";
1118 }
1119 program { name: "hide";
1120 signal: "elm,action,hide"; source: "elm";
1121 action: STATE_SET "default" 0.0;
1122 target: "base";
1123 }
1124 program { name: "bottomshow";
1125 signal: "elm,action,slot,bottom,show"; source: "elm";
1126 action: STATE_SET "visible" 0.0;
1127 transition: DECELERATE 0.3;
1128 target: "bottom";
1129 target: "elm.swallow.slot.bottom";
1130 }
1131 program { name: "bottomhide";
1132 signal: "elm,action,slot,bottom,hide"; source: "elm";
1133 action: STATE_SET "default" 0.0;
1134 transition: DECELERATE 0.5;
1135 target: "bottom";
1136 target: "elm.swallow.slot.bottom";
1137 }
1138 }
1139}
1140*/
diff --git a/src/lib/elm_menu.c b/src/lib/elm_menu.c
index 0b94ff3b5..25b10ee7e 100644
--- a/src/lib/elm_menu.c
+++ b/src/lib/elm_menu.c
@@ -202,10 +202,17 @@ _elm_menu_smart_theme(Eo *obj, void *_pd, va_list *list)
202 Eina_List *l, *_l, *_ll, *ll = NULL; 202 Eina_List *l, *_l, *_ll, *ll = NULL;
203 Elm_Menu_Item *item; 203 Elm_Menu_Item *item;
204 const char *s; 204 const char *s;
205 char style[1024];
205 206
206 eo_do_super(obj, MY_CLASS, elm_wdg_theme_apply(&int_ret)); 207 eo_do_super(obj, MY_CLASS, elm_wdg_theme_apply(&int_ret));
207 if (!int_ret) return; 208 if (!int_ret) return;
208 209
210 if (sd->menu_bar)
211 snprintf(style, sizeof(style), "main_menu/%s", elm_widget_style_get(obj));
212 else
213 snprintf(style, sizeof(style), "menu/%s", elm_widget_style_get(obj));
214 elm_object_style_set(sd->hv, style);
215
209 ll = eina_list_append(ll, sd->items); 216 ll = eina_list_append(ll, sd->items);
210 EINA_LIST_FOREACH(ll, _ll, l) 217 EINA_LIST_FOREACH(ll, _ll, l)
211 { 218 {
@@ -226,6 +233,8 @@ _elm_menu_smart_theme(Eo *obj, void *_pd, va_list *list)
226 if (!elm_layout_theme_set(VIEW(item), "menu", s, 233 if (!elm_layout_theme_set(VIEW(item), "menu", s,
227 elm_widget_style_get(obj))) 234 elm_widget_style_get(obj)))
228 CRI("Failed to set layout!"); 235 CRI("Failed to set layout!");
236 snprintf(style, sizeof(style), "menu/%s", elm_widget_style_get(WIDGET(item)));
237 elm_object_style_set(item->submenu.hv, style);
229 238
230 elm_object_item_text_set((Elm_Object_Item *)item, 239 elm_object_item_text_set((Elm_Object_Item *)item,
231 item->label); 240 item->label);
@@ -532,6 +541,7 @@ _item_submenu_obj_create(Elm_Menu_Item *item)
532{ 541{
533 ELM_MENU_DATA_GET(WIDGET(item), sd); 542 ELM_MENU_DATA_GET(WIDGET(item), sd);
534 Evas_Object *hv, *bx; 543 Evas_Object *hv, *bx;
544 char style[1024];
535 545
536 item->submenu.location = elm_icon_add(sd->bx); 546 item->submenu.location = elm_icon_add(sd->bx);
537 item->submenu.hv = hv = elm_hover_add(sd->bx); 547 item->submenu.hv = hv = elm_hover_add(sd->bx);
@@ -541,12 +551,16 @@ _item_submenu_obj_create(Elm_Menu_Item *item)
541 551
542 if (sd->menu_bar && !item->parent) 552 if (sd->menu_bar && !item->parent)
543 { 553 {
544 elm_object_style_set(hv, "main_menu_submenu"); 554 snprintf(style, sizeof(style), "main_menu_submenu/%s", elm_widget_style_get(WIDGET(item)));
555 elm_object_style_set(hv, style);
545 evas_object_smart_callback_add(hv, "dismissed", 556 evas_object_smart_callback_add(hv, "dismissed",
546 _hover_dismissed_cb, WIDGET(item)); 557 _hover_dismissed_cb, WIDGET(item));
547 } 558 }
548 else 559 else
549 elm_object_style_set(hv, "submenu"); 560 {
561 snprintf(style, sizeof(style), "submenu/%s", elm_widget_style_get(WIDGET(item)));
562 elm_object_style_set(hv, style);
563 }
550 564
551 item->submenu.bx = bx = elm_box_add(sd->bx); 565 item->submenu.bx = bx = elm_box_add(sd->bx);
552 elm_widget_mirrored_set(bx, EINA_FALSE); 566 elm_widget_mirrored_set(bx, EINA_FALSE);
@@ -602,7 +616,7 @@ _elm_menu_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
602 priv->hv = elm_hover_add(obj); 616 priv->hv = elm_hover_add(obj);
603 elm_widget_mirrored_set(priv->hv, EINA_FALSE); 617 elm_widget_mirrored_set(priv->hv, EINA_FALSE);
604 618
605 elm_object_style_set(priv->hv, "menu"); 619 elm_object_style_set(priv->hv, "menu/default");
606 evas_object_smart_callback_add(priv->hv, "dismissed", 620 evas_object_smart_callback_add(priv->hv, "dismissed",
607 _hover_dismissed_cb, obj); 621 _hover_dismissed_cb, obj);
608 622
@@ -665,9 +679,9 @@ _elm_menu_menu_bar_set(Eo *obj, Eina_Bool menu_bar)
665 sd->menu_bar = menu_bar; 679 sd->menu_bar = menu_bar;
666 680
667 if (menu_bar) 681 if (menu_bar)
668 elm_object_style_set(sd->hv, "main_menu"); 682 elm_object_style_set(sd->hv, "main_menu/default");
669 else 683 else
670 elm_object_style_set(sd->hv, "menu"); 684 elm_object_style_set(sd->hv, "menu/default");
671 685
672 EINA_LIST_FOREACH(sd->items, l, item) 686 EINA_LIST_FOREACH(sd->items, l, item)
673 { 687 {
@@ -677,14 +691,14 @@ _elm_menu_menu_bar_set(Eo *obj, Eina_Bool menu_bar)
677 { 691 {
678 evas_object_smart_callback_add(item->submenu.hv, "clicked", 692 evas_object_smart_callback_add(item->submenu.hv, "clicked",
679 _hover_dismissed_cb, WIDGET(item)); 693 _hover_dismissed_cb, WIDGET(item));
680 elm_object_style_set(item->submenu.hv, "main_menu_submenu"); 694 elm_object_style_set(item->submenu.hv, "main_menu_submenu/default");
681 } 695 }
682 else 696 else
683 { 697 {
684 evas_object_smart_callback_del_full(item->submenu.hv, "clicked", 698 evas_object_smart_callback_del_full(item->submenu.hv, "clicked",
685 _hover_dismissed_cb, 699 _hover_dismissed_cb,
686 WIDGET(item)); 700 WIDGET(item));
687 elm_object_style_set(item->submenu.hv, "submenu"); 701 elm_object_style_set(item->submenu.hv, "submenu/default");
688 } 702 }
689 } 703 }
690 704