Neil Hodgson | 24 Jul 2012 07:04

OS X horizontal scrolling, pinch zoom

   An issue came up off-list with horizontal scrolling on OS X: currently you can use the mouse wheel (or touch
area) to scroll right beyond the scroll range and the scroll bar shows no indication of this. You then have
to scroll back with no visual indication of what is happening.

   The scroll range could be extended in this case and the 'knob' shortened to indicate the expanded range.
Then scrolling back to the left would move the shortened knob.

   However, its unlikely the user wants to extend the scroll range when using this gesture, so another
approach is to limit wheel scrolling to the already established width. Are there any other points of view?

   One user doesn't like accidentally performing pinch zoom and would like an option to disable it or make it
less sensitive.

   Neil

--

-- 
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To post to this group, send email to scintilla-interest <at> googlegroups.com.
To unsubscribe from this group, send email to scintilla-interest+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scintilla-interest?hl=en.

Mike Lischke | 24 Jul 2012 09:23

Re: OS X horizontal scrolling, pinch zoom

Hey Neil,

>   An issue came up off-list with horizontal scrolling on OS X: currently you can use the mouse wheel (or touch
area) to scroll right beyond the scroll range and the scroll bar shows no indication of this. You then have
to scroll back with no visual indication of what is happening.

This code was written without touch devices in mind and hence doesn't properly handle those events.

> 
>   The scroll range could be extended in this case and the 'knob' shortened to indicate the expanded range.
Then scrolling back to the left would move the shortened knob.
> 
>   However, its unlikely the user wants to extend the scroll range when using this gesture, so another
approach is to limit wheel scrolling to the already established width. Are there any other points of view?

Especially touch scrolling should behave like in other controls of this kind (momentum scrolling at the
extremes). Not sure how this can be done well with the current horizontal scroll implementation in scintilla.

>   One user doesn't like accidentally performing pinch zoom and would like an option to disable it or make it
less sensitive.

I'm not aware of a pinch-zoom implementation. Must be a conversion to a different mouse related action
(e.g. Ctrl+Cmd+Wheel changes the zoom factor).

Mike
-- 
www.soft-gems.net

--

-- 
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
(Continue reading)

Neil Hodgson | 25 Jul 2012 03:14

Re: OS X horizontal scrolling, pinch zoom

Mike Lischke:

Especially touch scrolling should behave like in other controls of this kind (momentum scrolling at the extremes). Not sure how this can be done well with the current horizontal scroll implementation in scintilla.

   It would be much work either through reimplementing momentum and elasticity or through adapting Scintilla to work in an NSScrollView where that behaviour is free.

I'm not aware of a pinch-zoom implementation. Must be a conversion to a different mouse related action (e.g. Ctrl+Cmd+Wheel changes the zoom factor).

   The pinch zoom implementation was contributed by Matthew Brush:
http://scintilla.hg.sourceforge.net/hgweb/scintilla/scintilla/rev/3a7899a248a8

   Neil

--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To post to this group, send email to scintilla-interest <at> googlegroups.com.
To unsubscribe from this group, send email to scintilla-interest+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scintilla-interest?hl=en.
Matthew Brush | 25 Jul 2012 03:26
Picon

Re: OS X horizontal scrolling, pinch zoom

On 12-07-24 06:14 PM, Neil Hodgson wrote:
> Mike Lischke:
>
>> I'm not aware of a pinch-zoom implementation. Must be a conversion to 
>> a different mouse related action (e.g. Ctrl+Cmd+Wheel changes the 
>> zoom factor).
>
>    The pinch zoom implementation was contributed by Matthew Brush:
> http://scintilla.hg.sourceforge.net/hgweb/scintilla/scintilla/rev/3a7899a248a8
>
>

Also of interest:
https://groups.google.com/forum/?fromgroups#!topic/scintilla-interest/y4Yg62F1blg

Cheers,
Matthew Brush

--

-- 
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To post to this group, send email to scintilla-interest <at> googlegroups.com.
To unsubscribe from this group, send email to scintilla-interest+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scintilla-interest?hl=en.

Chinh Nguyen | 26 Jul 2012 17:37
Picon

Re: OS X horizontal scrolling, pinch zoom

Neil Hodgson:

   One user doesn't like accidentally performing pinch zoom and would like an option to disable it or make it less sensitive.

 
Funny, I was thinking pinch zoom was too sensitive just today.  I changed the behavior and was going to suggest my change.

- (void) magnifyWithEvent: (NSEvent *) event
{
  zoomDelta += event.magnification * 10.;

  if (fabsf(zoomDelta)>=1.) {
    long zoomFactor = [self getGeneralProperty: SCI_GETZOOM] + zoomDelta;
    [self setGeneralProperty: SCI_SETZOOM parameter: zoomFactor value:0];
    zoomDelta = 0.;
  }     
}

- (void) beginGestureWithEvent: (NSEvent *) event
{
  zoomDelta = 0.;
}

zoomDelta is declared as a CGFloat in the <at> interface.

--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To view this discussion on the web visit https://groups.google.com/d/msg/scintilla-interest/-/VACEom1NvUIJ.
To post to this group, send email to scintilla-interest <at> googlegroups.com.
To unsubscribe from this group, send email to scintilla-interest+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scintilla-interest?hl=en.
Neil Hodgson | 27 Jul 2012 06:32

Re: OS X horizontal scrolling, pinch zoom

Chinh Nguyen:

>   zoomDelta += event.magnification * 10.;
> 
>   if (fabsf(zoomDelta)>=1.) {
>     long zoomFactor = [self getGeneralProperty: SCI_GETZOOM] + zoomDelta;
>     [self setGeneralProperty: SCI_SETZOOM parameter: zoomFactor value:0];

   Zoom was originally implemented when fonts were only available in integral sizes. With fractional sizes
now supported on some platforms, including Cocoa, adding a fractional zoom level may be an improvement
and allow for better control with pinching. My also be better to make the zoom factor multiply the font
sizes: its currently added.

   Neil

--

-- 
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To post to this group, send email to scintilla-interest <at> googlegroups.com.
To unsubscribe from this group, send email to scintilla-interest+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scintilla-interest?hl=en.

Neil Hodgson | 29 Jul 2012 09:06

Re: OS X horizontal scrolling, pinch zoom

Chinh Nguyen:

> - (void) magnifyWithEvent: (NSEvent *) event
> {
>   zoomDelta += event.magnification * 10.;
> …

   OK, committed.

   Neil

--

-- 
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To post to this group, send email to scintilla-interest <at> googlegroups.com.
To unsubscribe from this group, send email to scintilla-interest+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scintilla-interest?hl=en.


Gmane