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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user