Zooming with a Mac trackpad doesn't work well

Bug #1086446 reported by treaves
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Stellarium
Fix Released
Medium
Unassigned

Bug Description

Tags: mac-os-x

Related branches

Revision history for this message
Joshua Wetenkamp (dfjosh) wrote :

I mean really, with a trackpad, zooming should be accomplished with pinch to zoom, right? I remember when Mavericks launched, how pleasurable and logical it felt to finally be able to 'pinch to zoom' and 'two finger scroll to move around' in the Maps app vs how clunky google maps in the browser has always felt. Its like night and day.

But, yes, zooming via two finger scrolling is just not right. Its actually very unresponsive and painful to do. I often just end up using the keyboard (command-up and -down) which is not ideal.

Still, Stellarium is a beautiful, beautiful creation. Thank you so much!

Revision history for this message
henrysky (henry-leung-2010) wrote :

I think this problem had an significant improvement in 0.13.0...

Revision history for this message
henrysky (henry-leung-2010) wrote :

For you to reference: https://bugreports.qt-project.org/browse/QTBUG-34378
They said this problem is fixed in Qt 5.2.1
But I think the scrolling is still not that smooth but is better than version 0.12

Changed in stellarium:
assignee: treaves (treaves) → nobody
milestone: none → 0.13.0
Revision history for this message
Szabolcs (szhorvat) wrote :

I tried the "13.0dev3" prerelease, but zooming via scrolling seems just as bad as in 12.4 on a Mac laptop. (The retina support is great though :)

Revision history for this message
Bogdan Marinov (daggerstab) wrote :

We should probably look into gesture recognition on desktop platforms...

Revision history for this message
Szabolcs (szhorvat) wrote :

There are a number of cross platform programs I use on OS X that use "scrolling" for zooming and don't have this problem (Google Earth, which is Qt based, and a number of Java programs come to mind). So it should be possible to get this to work better in Stellarium without doing a lot of extra work to support gestures and pinch zooming.

I'm not a programmer, I have minimal experience with Qt, and I'm not in a position to start hacking on Stellarium, so I apologize if the following comment is not helpful.

Looking at the Qt docs,

http://qt-project.org/doc/qt-5/QWheelEvent.html

I see this:

"There are two ways to read the wheel event delta: angleDelta() returns the delta in wheel degrees. This value is always provided. pixelDelta() returns the delta in screen pixels and is available on platforms that have high-resolution trackpads, such as Mac OS X."

Stellarium's behaviour *seems* like it uses low resolution values because I need to pull my fingers on the trackpad for quite a long distance before it responds at all to the scroll event, and when it does respond, it zooms a relatively large amount. The ideal behaviour would be to zoom continuously as I'm pulling my fingers over the touchpad, and allow zooming just a little bit.

Isn't the key to the solution using the high resolution value from the pixelDelta() member function (on OS X, as this might not be available on other platforms)?

Revision history for this message
Alexander Wolf (alexwolf) wrote :
Revision history for this message
Szabolcs (szhorvat) wrote :

Unfortunately scrolling is still "choppy" with dev3.1 in the sense that if I continuously drag my finger across the touchpad, not much happens, then if I drag it for long enough it suddenly zooms by a fixed amount.

It is however much better than 12.4 because if I quickly swipe the touchpad (which would activate inertial scrolling in programs which actually scroll, e.g. a web browser), it will predictably zoom in one step. 12.4 would zoom rather unpredictably in this case and sometimes zoom in to the extreme. This version is much more usable now.

So quickly swiping works well for easily zooming in one step. It also works for zooming out, but the animation is strange when zooming out: first the zooming is very very slow then it gradually speeds up. The whole process of zooming out one step takes longer than zooming in. Both zoom in and zoom out animation are fluid, but zooming out is simply slower.

Revision history for this message
Alexander Wolf (alexwolf) wrote :
Revision history for this message
Szabolcs (szhorvat) wrote :

Hello Alexander,

Thank you for working on it. I tried dev3.2 and it looks/seems the same as dev3.1.

To comment some more on the zoom out animation: it seems that the zoom in and the zoom out animations are the same but reversed in time. Zoom in is fast at the beginning and slow at the end. Zoom out is the reverse. The first seems natural, the second very unnatural. My point is that it is possible that I was wrong and zooming out doesn't take longer than zooming in, it simply *feels* longer because it's slow at the beginning and fast at the end (the reverse of zoom in).

Revision history for this message
Alexander Wolf (alexwolf) wrote :

I don't have macbook and fixing this issue is problematic for me.

Revision history for this message
Alexander Wolf (alexwolf) wrote :

Can you test latest binary of the version 0.13.0?

Changed in stellarium:
status: Triaged → In Progress
Revision history for this message
Szabolcs (szhorvat) wrote :

Do you mean 13.0dev11 from https://launchpad.net/stellarium/+download ?

Revision history for this message
Alexander Wolf (alexwolf) wrote :

Yes.

Revision history for this message
Szabolcs (szhorvat) wrote :

I'm sorry, dev11 is not any better than the previous ones I tried.

I didn't know that no people workign on Stellarium have access to a Mac with a trackpad. In this case it is indeed difficult to find a fix. Since the obvious attempt didn't fix the problem, it's probably more productive not to spend time on this until someone working on Stelarium gets a Mac (with trackpad) or someone who has a Mac starts working on Stellarium.

Thanks for trying to fix it! :-)

Changed in stellarium:
milestone: 0.13.0 → 0.13.1
Revision history for this message
Szabolcs (szhorvat) wrote :

But of course I'll be happy to test any development versions if you guys will keep trying to fix this! :-)

Changed in stellarium:
milestone: 0.13.1 → 0.13.0
assignee: nobody → Clément Sommelet (csommelet)
Revision history for this message
Alexander Wolf (alexwolf) wrote :

Szabolcs, please check 0.13.0beta1exp.

Revision history for this message
Szabolcs (szhorvat) wrote :

It crashes immediately on startup:

Application Specific Information:
abort() called

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff8d56b866 __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff9073835c pthread_kill + 92
2 libsystem_c.dylib 0x00007fff842a9b1a abort + 125
3 QtCore 0x0000000108f5a4f9 qt_message_fatal(QtMsgType, QMessageLogContext const&, QString const&) + 9
4 QtCore 0x0000000108f5baa1 QMessageLogger::fatal(char const*, ...) const + 161
5 QtGui 0x0000000108a2019e QGuiApplicationPrivate::createPlatformIntegration() + 5678
6 QtGui 0x0000000108a201bb QGuiApplicationPrivate::createEventDispatcher() + 27
7 QtCore 0x0000000109173495 QCoreApplication::init() + 117
8 QtCore 0x00000001091733f7 QCoreApplication::QCoreApplication(QCoreApplicationPrivate&) + 39
9 QtGui 0x0000000108a1d9be QGuiApplication::QGuiApplication(QGuiApplicationPrivate&) + 14
10 QtWidgets 0x0000000109db875e QApplication::QApplication(int&, char**, int) + 206
11 org.stellarium.Stellarium 0x00000001080ffebb main + 619
12 org.stellarium.Stellarium 0x0000000107f616d4 start + 52

Revision history for this message
Alexander Wolf (alexwolf) wrote :

Bad news :( What about 0.13.0beta1?

Revision history for this message
Szabolcs (szhorvat) wrote :

Same crash with that version. Do you need me to try to test on different computers?

I have access to two 10.9.3 machines and one 10.7.x at my office.

Revision history for this message
Alexander Wolf (alexwolf) wrote :

No. It's deployment issue - please try it again around 5-10 minutes later - I'll upload fresh packages.

Revision history for this message
Szabolcs (szhorvat) wrote :

Hey, it works!! :-)

Changed in stellarium:
status: In Progress → Fix Committed
Changed in stellarium:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.