UI: Add Preference for Menu Close on Leave

This PR changes the current behavior that closes menus that are open
when your mouse is moved out of its "safe" area (a bit wider than its
visible bounds). With this PR applied menus stay open unless you click
elsewhere, hover a neighboring menu, press escape, or select an item.
Although this PR turns off menu mouse leave, it also adds a preference
that can be used to turn it back on.

Pull Request: https://projects.blender.org/blender/blender/pulls/145523
This commit is contained in:
Harley Acheson
2025-10-06 20:19:12 +02:00
committed by Harley Acheson
parent 80e8493c11
commit 5953ff318c
6 changed files with 17 additions and 8 deletions

View File

@@ -344,12 +344,15 @@ class USERPREF_PT_interface_statusbar(InterfacePanel, CenterAlignMixIn, Panel):
col.prop(view, "show_statusbar_version", text="Blender Version")
class USERPREF_PT_interface_menus(InterfacePanel, Panel):
class USERPREF_PT_interface_menus(InterfacePanel, CenterAlignMixIn, Panel):
bl_label = "Menus"
bl_options = {'DEFAULT_CLOSED'}
def draw(self, context):
pass
def draw_centered(self, context, layout):
prefs = context.preferences
view = prefs.view
col = layout.column()
col.prop(view, "menu_close_leave")
class USERPREF_PT_interface_menus_mouse_over(InterfacePanel, CenterAlignMixIn, Panel):