Further trackpad work:

When trackpad swipes don't convert to ScrollWheel steps anymore, several hardcoded
wheel events need to support swipe too.

This adds swipe support to:
- Menu item scroll
- Search item scroll
- ALT + number/slider/swatch values

The amount of old style scroll "clicks" is calculated based on how trackad is
being mapped to move a mouse pointer. Move it one widget unit = 1 click.

The swatch option applies trackpad swipe motion in analog way.
This commit is contained in:
2013-01-01 16:42:35 +00:00
parent 2e0e2cb170
commit be519ad7ff
3 changed files with 77 additions and 22 deletions

View File

@@ -896,8 +896,12 @@ void ui_searchbox_apply(uiBut *but, ARegion *ar)
void ui_searchbox_event(bContext *C, ARegion *ar, uiBut *but, wmEvent *event)
{
uiSearchboxData *data = ar->regiondata;
int type = event->type, val = event->val;
switch (event->type) {
if (type == MOUSEPAN)
ui_pan_to_scroll(event, &type, &val);
switch (type) {
case WHEELUPMOUSE:
case UPARROWKEY:
ui_searchbox_select(C, ar, but, -1);