diff options
author | Joshua Leung <aligorith@gmail.com> | 2016-03-29 17:14:52 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2016-03-29 17:21:58 +0300 |
commit | d29b32ae3655599aa44de598a2e3d00ac6654817 (patch) | |
tree | 3cbc9be5f6227ca0e5373f221da499d48aff02b9 /source/blender | |
parent | deffd4352bb0143a69dfa57044152ddac6432468 (diff) |
RMB Menu: Add icons for delineating each cluster of options in this menu
From T33052 by Harley Acheson (harley)
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 9edc6e58a76..023439fddee 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -6641,7 +6641,7 @@ static bool ui_but_menu(bContext *C, uiBut *but) /* replace/delete keyfraemes */ if (is_array_component) { uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Replace Keyframes"), - ICON_NONE, "ANIM_OT_keyframe_insert_button", "all", 1); + ICON_KEY_HLT, "ANIM_OT_keyframe_insert_button", "all", 1); uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Replace Single Keyframe"), ICON_NONE, "ANIM_OT_keyframe_insert_button", "all", 0); uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Delete Keyframes"), @@ -6651,7 +6651,7 @@ static bool ui_but_menu(bContext *C, uiBut *but) } else { uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Replace Keyframe"), - ICON_NONE, "ANIM_OT_keyframe_insert_button", "all", 1); + ICON_KEY_HLT, "ANIM_OT_keyframe_insert_button", "all", 1); uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Delete Keyframe"), ICON_NONE, "ANIM_OT_keyframe_delete_button", "all", 1); } @@ -6667,26 +6667,26 @@ static bool ui_but_menu(bContext *C, uiBut *but) else if (is_anim) { if (is_array_component) { uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Insert Keyframes"), - ICON_NONE, "ANIM_OT_keyframe_insert_button", "all", 1); + ICON_KEY_HLT, "ANIM_OT_keyframe_insert_button", "all", 1); uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Insert Single Keyframe"), ICON_NONE, "ANIM_OT_keyframe_insert_button", "all", 0); } else { uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Insert Keyframe"), - ICON_NONE, "ANIM_OT_keyframe_insert_button", "all", 1); + ICON_KEY_HLT, "ANIM_OT_keyframe_insert_button", "all", 1); } } if ((but->flag & UI_BUT_ANIMATED) && (but->rnapoin.type != &RNA_NlaStrip)) { if (is_array_component) { uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Clear Keyframes"), - ICON_NONE, "ANIM_OT_keyframe_clear_button", "all", 1); + ICON_KEY_DEHLT, "ANIM_OT_keyframe_clear_button", "all", 1); uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Clear Single Keyframes"), ICON_NONE, "ANIM_OT_keyframe_clear_button", "all", 0); } else { uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Clear Keyframes"), - ICON_NONE, "ANIM_OT_keyframe_clear_button", "all", 1); + ICON_KEY_DEHLT, "ANIM_OT_keyframe_clear_button", "all", 1); } } @@ -6696,13 +6696,13 @@ static bool ui_but_menu(bContext *C, uiBut *but) if (is_array_component) { uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Delete Drivers"), - ICON_NONE, "ANIM_OT_driver_button_remove", "all", 1); + ICON_X, "ANIM_OT_driver_button_remove", "all", 1); uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Delete Single Driver"), ICON_NONE, "ANIM_OT_driver_button_remove", "all", 0); } else { uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Delete Driver"), - ICON_NONE, "ANIM_OT_driver_button_remove", "all", 1); + ICON_X, "ANIM_OT_driver_button_remove", "all", 1); } uiItemO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Copy Driver"), @@ -6721,12 +6721,12 @@ static bool ui_but_menu(bContext *C, uiBut *but) if (is_array_component) { uiItemMenuEnumO(layout, C, "ANIM_OT_driver_button_add", "mapping_type", CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Add Drivers"), - ICON_NONE); + ICON_DRIVER); } else { uiItemMenuEnumO(layout, C, "ANIM_OT_driver_button_add", "mapping_type", CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Add Driver"), - ICON_NONE); + ICON_DRIVER); } if (ANIM_driver_can_paste()) { @@ -6742,7 +6742,7 @@ static bool ui_but_menu(bContext *C, uiBut *but) if (is_array_component) { uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Add All to Keying Set"), - ICON_NONE, "ANIM_OT_keyingset_button_add", "all", 1); + ICON_KEYINGSET, "ANIM_OT_keyingset_button_add", "all", 1); uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Add Single to Keying Set"), ICON_NONE, "ANIM_OT_keyingset_button_add", "all", 0); uiItemO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Remove from Keying Set"), @@ -6750,7 +6750,7 @@ static bool ui_but_menu(bContext *C, uiBut *but) } else { uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Add to Keying Set"), - ICON_NONE, "ANIM_OT_keyingset_button_add", "all", 1); + ICON_KEYINGSET, "ANIM_OT_keyingset_button_add", "all", 1); uiItemO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Remove from Keying Set"), ICON_NONE, "ANIM_OT_keyingset_button_remove"); } @@ -6765,13 +6765,13 @@ static bool ui_but_menu(bContext *C, uiBut *but) if (is_array_component) { uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Reset All to Default Values"), - ICON_NONE, "UI_OT_reset_default_button", "all", 1); + ICON_LOOP_BACK, "UI_OT_reset_default_button", "all", 1); uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Reset Single to Default Value"), ICON_NONE, "UI_OT_reset_default_button", "all", 0); } else { uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Reset to Default Value"), - ICON_NONE, "UI_OT_reset_default_button", "all", 1); + ICON_LOOP_BACK, "UI_OT_reset_default_button", "all", 1); } if (is_editable /*&& is_idprop*/ && is_set) { uiItemO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Unset"), @@ -6804,7 +6804,7 @@ static bool ui_but_menu(bContext *C, uiBut *but) 0, 0, uiLayoutGetWidth(layout), UI_UNIT_Y, ""); #endif - but2 = uiDefIconTextBut(block, UI_BTYPE_BUT, 0, ICON_NONE, + but2 = uiDefIconTextBut(block, UI_BTYPE_BUT, 0, ICON_HAND, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Change Shortcut"), 0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, ""); UI_but_func_set(but2, popup_change_shortcut_func, but, NULL); @@ -6815,7 +6815,7 @@ static bool ui_but_menu(bContext *C, uiBut *but) UI_but_func_set(but2, remove_shortcut_func, but, NULL); } else { - but2 = uiDefIconTextBut(block, UI_BTYPE_BUT, 0, ICON_NONE, IFACE_("Non-Keyboard Shortcut"), + but2 = uiDefIconTextBut(block, UI_BTYPE_BUT, 0, ICON_HAND, IFACE_("Non-Keyboard Shortcut"), 0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, TIP_("Only keyboard shortcuts can be edited that way, " "please use User Preferences otherwise")); @@ -6824,7 +6824,7 @@ static bool ui_but_menu(bContext *C, uiBut *but) } /* only show 'add' if there's a suitable key map for it to go in */ else if (WM_keymap_guess_opname(C, but->optype->idname)) { - but2 = uiDefIconTextBut(block, UI_BTYPE_BUT, 0, ICON_NONE, + but2 = uiDefIconTextBut(block, UI_BTYPE_BUT, 0, ICON_HAND, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Add Shortcut"), 0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, ""); UI_but_func_set(but2, popup_add_shortcut_func, but, NULL); @@ -6848,7 +6848,7 @@ static bool ui_but_menu(bContext *C, uiBut *but) if (UI_but_online_manual_id(but, buf, sizeof(buf))) { uiItemO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Online Manual"), - ICON_NONE, "WM_OT_doc_view_manual_ui_context"); + ICON_URL, "WM_OT_doc_view_manual_ui_context"); WM_operator_properties_create(&ptr_props, "WM_OT_doc_view"); RNA_string_set(&ptr_props, "doc_id", buf); |