diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-23 04:11:18 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-23 04:11:18 +0300 |
commit | 5f2ac43b5fe8e7c3ad2758316a465c09d1f023c4 (patch) | |
tree | 90d72b8e46e3edaf3d5068f9224c8e0065e37916 /source/blender/editors/interface | |
parent | abf9c628b213dd9c9defb813a34234e4eae777d4 (diff) |
UI: allow inaccurate swipe motion to switch tabs
Removes the need to keep your cursor over tabs while dragging.
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_layout.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 5e8b420e018..306fa89a062 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -718,6 +718,11 @@ static void ui_item_enum_expand_exec( if (ui_layout_local_dir(layout) != UI_LAYOUT_HORIZONTAL) but->drawflag |= UI_BUT_TEXT_LEFT; + + /* Allow quick, inaccurate swipe motions to switch tabs (no need to keep cursor over them). */ + if (but_type == UI_BTYPE_TAB) { + but->flag |= UI_BUT_DRAG_LOCK; + } } UI_block_layout_set_current(block, layout); |