elm: Add main menu hover style
authorHenrique Dante de Almeida <hdante@profusion.mobi>
Thu, 17 Jan 2013 22:10:57 +0000 (22:10 +0000)
committerBruno Dilly <bdilly@profusion.mobi>
Thu, 17 Jan 2013 22:10:57 +0000 (22:10 +0000)
This allows the first level of an elm_menu to be styled as a menu bar

Patch by: Henrique Dante de Almeida <hdante@profusion.mobi>

SVN revision: 82954

legacy/elementary/data/themes/widgets/hover.edc

index 5762321..f667bce 100644 (file)
@@ -892,6 +892,206 @@ group { name: "elm/hover/base/submenu";
    }
 }
 
+group { name: "elm/hover/base/main_menu";
+   parts {
+      part { name: "elm.swallow.offset";
+         type: SWALLOW;
+         description { state: "default" 0.0;
+            visible: 0;
+            fixed: 1 1;
+        }
+      }
+      part { name: "elm.swallow.size";
+         type: SWALLOW;
+         description { state: "default" 0.0;
+            align: 0.0 0.0;
+            rel2.relative: 0.0 0.0;
+            rel1.offset: 4 0;
+            fixed: 1 1;
+         }
+      }
+      part { name: "bottomclip";
+         type: RECT;
+         description { state: "default" 0.0;
+            rel1.offset: -1 -2;
+         }
+      }
+      part { name: "bottom";
+         clip_to: "bottomclip";
+         type: RECT;
+         description { state: "default" 0.0;
+            visible: 0;
+            rel1.to: "elm.swallow.slot.bottom";
+            rel1.offset: -5 -5;
+            rel2.to: "elm.swallow.slot.bottom";
+            rel2.offset: 4 4;
+         }
+      }
+      part { name: "elm.swallow.slot.bottom";
+         type: SWALLOW;
+         clip_to: "bottomclip";
+         description { state: "default" 0.0;
+            align: 0.5 1.0;
+            rel1.to: "elm.swallow.size";
+            rel1.relative: 0.0 1.0;
+            rel2.to: "elm.swallow.size";
+            fixed: 1 1;
+         }
+         description { state: "visible" 0.0;
+            inherit: "default" 0.0;
+            rel1.offset: 0 6;
+            rel2.offset: -1 6;
+            align: 0.5 0.0;
+         }
+      }
+   }
+   programs {
+      program { name: "bottomshow";
+         signal: "elm,action,slot,bottom,show";
+         source: "elm";
+         action: STATE_SET "visible" 0.0;
+         transition: DECELERATE 0.3;
+         target: "elm.swallow.slot.bottom";
+      }
+   }
+}
+
+group { name: "elm/hover/base/main_menu_submenu";
+   images {
+      image: "shad_circ.png" COMP;
+      image: "bt_dis_base.png" COMP;
+   }
+   parts {
+      part { name: "elm.swallow.offset";
+         type: SWALLOW;
+         repeat_events:1;
+         description { state: "default" 0.0;
+            align: 0.0 0.0;
+            rel2.relative: 0.0 0.0;
+         }
+      }
+      part { name: "elm.swallow.size";
+         type: SWALLOW;
+         description { state: "default" 0.0;
+            align: 0.0 0.0;
+            rel1.to: "elm.swallow.offset";
+            rel1.relative: 1.0 1.0;
+            rel2.to: "elm.swallow.offset";
+         }
+      }
+      part { name: "base";
+         type: RECT;
+         mouse_events: 1;
+         description { state: "default" 0.0;
+            color: 0 0 0 0;
+         }
+      }
+      part { name: "bottomclip";
+         type: RECT;
+         description { state: "default" 0.0;
+            rel1.to_y: "pop";
+            rel1.relative: 0.0 1.0;
+            rel1.offset: -1 -2;
+         }
+      }
+      part { name: "bottom";
+         clip_to: "bottomclip";
+         description { state: "default" 0.0;
+            visible: 0;
+            rel1.to: "elm.swallow.slot.bottom";
+            rel1.offset: -5 -5;
+            rel2.to: "elm.swallow.slot.bottom";
+            rel2.offset: 4 4;
+            image {
+               normal: "bt_dis_base.png";
+               border: 4 4 4 4;
+            }
+            image.middle: SOLID;
+         }
+         description { state: "visible" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+         }
+      }
+      part { name: "elm.swallow.slot.bottom";
+         type: SWALLOW;
+         clip_to: "bottomclip";
+         description { state: "default" 0.0;
+            align: 0.5 1.0;
+            rel1.to: "elm.swallow.slot.middle";
+            rel1.relative: 0.0 1.0;
+            rel1.offset: 0 0;
+            rel2.to: "elm.swallow.slot.middle";
+            rel2.relative: 1.0 1.0;
+            rel2.offset: -1 0;
+         }
+         description { state: "visible" 0.0;
+            inherit: "default" 0.0;
+            rel1.offset: 0 6;
+            rel2.offset: -1 6;
+            align: 0.5 0.0;
+         }
+      }
+      part { name: "pop";
+         mouse_events: 1;
+         repeat_events:1;
+         description { state: "default" 0.0;
+            rel1.to: "elm.swallow.slot.middle";
+            rel1.offset: -5 -5;
+            rel2.to: "elm.swallow.slot.middle";
+            rel2.offset: 4 4;
+            image {
+               normal: "bt_dis_base.png";
+               border: 4 4 4 4;
+            }
+         }
+      }
+      part { name: "elm.swallow.slot.middle";
+         type: SWALLOW;
+         repeat_events:1;
+         description { state: "default" 0.0;
+            rel1.to: "elm.swallow.size";
+            rel2.to: "elm.swallow.size";
+         }
+      }
+   }
+   programs {
+      program { name: "end";
+         signal: "mouse,up,1";
+         source: "base";
+         action: SIGNAL_EMIT "elm,action,dismiss" "";
+      }
+      program { name: "show";
+         signal: "elm,action,show";
+         source: "elm";
+         action: STATE_SET "visible" 0.0;
+         target: "base";
+      }
+      program { name: "hide";
+         signal: "elm,action,hide";
+         source: "elm";
+         action: STATE_SET "default" 0.0;
+         target: "base";
+      }
+      program { name: "bottomshow";
+         signal: "elm,action,slot,bottom,show";
+         source: "elm";
+         action: STATE_SET "visible" 0.0;
+         transition: DECELERATE 0.3;
+         target: "bottom";
+         target: "elm.swallow.slot.bottom";
+      }
+      program { name: "bottomhide";
+         signal: "elm,action,slot,bottom,hide";
+         source: "elm";
+         action: STATE_SET "default" 0.0;
+         transition: DECELERATE 0.5;
+         target: "bottom";
+         target: "elm.swallow.slot.bottom";
+      }
+   }
+}
+
 group { name: "elm/hover/base/hoversel_vertical/default";
    alias: "elm/hover/base/hoversel_vertical/entry";
    images {