summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-02-08 13:12:51 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-02-08 13:13:45 +0900
commit546937e0b3df9b02846de2e275d918adbca9b50f (patch)
tree7f2dd5fdbc7487987e5984b50debb8cd1bfd3bf8
parent81403f449482cb5aa20ce2003f46ddd542fab5d5 (diff)
elm-menu - fix style to use current when setting menu bar
-rw-r--r--src/lib/elm_menu.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/lib/elm_menu.c b/src/lib/elm_menu.c
index 25b10ee7e..61093a0e7 100644
--- a/src/lib/elm_menu.c
+++ b/src/lib/elm_menu.c
@@ -669,7 +669,8 @@ _elm_menu_menu_bar_set(Eo *obj, Eina_Bool menu_bar)
669{ 669{
670 Eina_List *l; 670 Eina_List *l;
671 Elm_Menu_Item *item; 671 Elm_Menu_Item *item;
672 672 char style[1024];
673
673 ELM_MENU_DATA_GET_OR_RETURN(obj, sd); 674 ELM_MENU_DATA_GET_OR_RETURN(obj, sd);
674 675
675 if (menu_bar == sd->menu_bar) return; 676 if (menu_bar == sd->menu_bar) return;
@@ -678,10 +679,11 @@ _elm_menu_menu_bar_set(Eo *obj, Eina_Bool menu_bar)
678 elm_box_homogeneous_set(sd->bx, !menu_bar); 679 elm_box_homogeneous_set(sd->bx, !menu_bar);
679 sd->menu_bar = menu_bar; 680 sd->menu_bar = menu_bar;
680 681
681 if (menu_bar) 682 if (sd->menu_bar)
682 elm_object_style_set(sd->hv, "main_menu/default"); 683 snprintf(style, sizeof(style), "main_menu/%s", elm_widget_style_get(obj));
683 else 684 else
684 elm_object_style_set(sd->hv, "menu/default"); 685 snprintf(style, sizeof(style), "menu/%s", elm_widget_style_get(obj));
686 elm_object_style_set(sd->hv, style);
685 687
686 EINA_LIST_FOREACH(sd->items, l, item) 688 EINA_LIST_FOREACH(sd->items, l, item)
687 { 689 {
@@ -691,14 +693,16 @@ _elm_menu_menu_bar_set(Eo *obj, Eina_Bool menu_bar)
691 { 693 {
692 evas_object_smart_callback_add(item->submenu.hv, "clicked", 694 evas_object_smart_callback_add(item->submenu.hv, "clicked",
693 _hover_dismissed_cb, WIDGET(item)); 695 _hover_dismissed_cb, WIDGET(item));
694 elm_object_style_set(item->submenu.hv, "main_menu_submenu/default"); 696 snprintf(style, sizeof(style), "main_menu_submenu//%s", elm_widget_style_get(obj));
697 elm_object_style_set(item->submenu.hv, style);
695 } 698 }
696 else 699 else
697 { 700 {
698 evas_object_smart_callback_del_full(item->submenu.hv, "clicked", 701 evas_object_smart_callback_del_full(item->submenu.hv, "clicked",
699 _hover_dismissed_cb, 702 _hover_dismissed_cb,
700 WIDGET(item)); 703 WIDGET(item));
701 elm_object_style_set(item->submenu.hv, "submenu/default"); 704 snprintf(style, sizeof(style), "submenu/%s", elm_widget_style_get(obj));
705 elm_object_style_set(item->submenu.hv, style);
702 } 706 }
703 } 707 }
704 708