diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-07-06 14:37:39 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-07-06 15:32:25 +0300 |
commit | b0c32818ba401a81c18f89f931d4336d8e859bc2 (patch) | |
tree | bcf20bb1f097ce6950085dacc4a5870b6eaffe0a /source/blender/editors/space_buttons | |
parent | 9fc79a403374d06a23080df6249c207357009716 (diff) |
UI: small layout fixes for RMB context menus.
Diffstat (limited to 'source/blender/editors/space_buttons')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_ops.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c index 93670919d4c..fb2907983c8 100644 --- a/source/blender/editors/space_buttons/buttons_ops.c +++ b/source/blender/editors/space_buttons/buttons_ops.c @@ -64,17 +64,9 @@ static int context_menu_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *UNUSED(event)) { - bScreen *sc = CTX_wm_screen(C); - SpaceButs *sbuts = CTX_wm_space_buts(C); - PointerRNA ptr; - uiPopupMenu *pup; - uiLayout *layout; - - RNA_pointer_create(&sc->id, &RNA_SpaceProperties, sbuts, &ptr); - - pup = UI_popup_menu_begin(C, IFACE_("Align"), ICON_NONE); - layout = UI_popup_menu_layout(pup); - uiItemsEnumR(layout, &ptr, "align"); + uiPopupMenu *pup = UI_popup_menu_begin(C, IFACE_("Context Menu"), ICON_NONE); + uiLayout *layout = UI_popup_menu_layout(pup); + uiItemM(layout, "INFO_MT_area", NULL, ICON_NONE); UI_popup_menu_end(C, pup); return OPERATOR_INTERFACE; @@ -84,7 +76,7 @@ void BUTTONS_OT_context_menu(wmOperatorType *ot) { /* identifiers */ ot->name = "Context Menu"; - ot->description = "Display button panel context_menu"; + ot->description = "Display properties editor context_menu"; ot->idname = "BUTTONS_OT_context_menu"; /* api callbacks */ |