UI: Add Hide to Properties NavBar Item Context Menu
Add an item to hide the NavBar to the Context Menu for the items on the NavBar. Pull Request: https://projects.blender.org/blender/blender/pulls/138786
This commit is contained in:
committed by
Harley Acheson
parent
8fdaa555e8
commit
87dcf4907a
@@ -26,6 +26,7 @@ struct uiLayout;
|
||||
blender::Vector<eSpaceButtons_Context> ED_buttons_tabs_list(const SpaceProperties *sbuts,
|
||||
bool apply_filter = true);
|
||||
void ED_buttons_visible_tabs_menu(bContext *C, uiLayout *layout, void * /*arg*/);
|
||||
void ED_buttons_navbar_menu(bContext *C, uiLayout *layout, void * /*arg*/);
|
||||
bool ED_buttons_tab_has_search_result(SpaceProperties *sbuts, int index);
|
||||
|
||||
void ED_buttons_search_string_set(SpaceProperties *sbuts, const char *value);
|
||||
|
||||
@@ -1357,11 +1357,7 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but, const wmEvent *ev
|
||||
layout, IFACE_("Header"), ICON_NONE, ED_screens_header_tools_menu_create, nullptr);
|
||||
}
|
||||
else if (region->regiontype == RGN_TYPE_NAV_BAR) {
|
||||
uiItemMenuF(layout,
|
||||
IFACE_("Navigation Bar"),
|
||||
ICON_NONE,
|
||||
ED_screens_region_flip_menu_create,
|
||||
nullptr);
|
||||
uiItemMenuF(layout, IFACE_("Navigation Bar"), ICON_NONE, ED_buttons_navbar_menu, nullptr);
|
||||
const ScrArea *area = CTX_wm_area(C);
|
||||
if (area && area->spacetype == SPACE_PROPERTIES) {
|
||||
uiItemMenuF(
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#include "BKE_screen.hh"
|
||||
#include "BKE_shader_fx.h"
|
||||
|
||||
#include "BLT_translation.hh"
|
||||
|
||||
#include "ED_buttons.hh"
|
||||
#include "ED_screen.hh"
|
||||
#include "ED_space_api.hh"
|
||||
@@ -195,6 +197,13 @@ void ED_buttons_visible_tabs_menu(bContext *C, uiLayout *layout, void * /*arg*/)
|
||||
}
|
||||
}
|
||||
|
||||
void ED_buttons_navbar_menu(bContext *C, uiLayout *layout, void * /*arg*/)
|
||||
{
|
||||
ED_screens_region_flip_menu_create(C, layout, nullptr);
|
||||
uiLayoutSetOperatorContext(layout, WM_OP_INVOKE_DEFAULT);
|
||||
layout->op("SCREEN_OT_region_toggle", IFACE_("Hide"), ICON_NONE);
|
||||
}
|
||||
|
||||
blender::Vector<eSpaceButtons_Context> ED_buttons_tabs_list(const SpaceProperties *sbuts,
|
||||
bool apply_filter)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user