Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QtGUI: Remove scroll wheel check for scrollbars in Windows and Linux #3686

Merged

Conversation

jamshark70
Copy link
Contributor

Temporary workaround for issue #3552.

Automatically-faded scroll bars do not work well in Linux or Windows. Unfortunately, if the user touches the scroll wheel, then scroll bars start to fade out and become unreachable.

Under issue #3552, we were discussing research into Linux and Windows system preferences for fading scrollbars, and per-view control. That's an extensive enhancement request.

In the meantime, I was recently in the position of trying to explain to a classroom of students why the scrollbars disappear if you touch the scroll wheel, but not before. Let's just say that the rationale for the current behavior was met with universal incomprehension.

Currently, we have a situation that simply doesn't make sense to typical users in Windows and Linux. So, at the very least, for 3.10, it would be a measurable improvement just to get rid of that logic. It doesn't close the other issue, but at least it would change the behavior to something explainable.

Temporary workaround for issue supercollider#3552.

Automatically-faded scroll bars do not work well in Linux or Windows.
Unfortunately, if the user touches the scroll wheel, then scroll bars
start to fade out and become unreachable.
@jamshark70 jamshark70 added the comp: Qt GUI sclang Qt components -- for IDE tickets, use "env: SCIDE" instead label Apr 16, 2018
@gusano
Copy link
Member

gusano commented Apr 16, 2018

@jamshark70 This does not quite make it for me (ArchLinux). Here are the behaviors on both my installed wm:

  • awesome: does nothing, scrollbars hide automatically
  • xfce: scrollbar stay visible but will autohide after scrolling at least once

I really believe that this behavior is WM-dependent, not sure how to really fix it.

@jamshark70
Copy link
Contributor Author

scrollbar stay visible but will autohide after scrolling at least once

That's the behavior I get in XFCE if I run vanilla sclang, without this patch. With the patch, scrollbars stay up. So it isn't only WM-dependent. Maybe you've changed some other system setting that overrides the function, or maybe you're accidentally running an unpatched sclang.

@gusano
Copy link
Member

gusano commented Apr 16, 2018

@jamshark70 oops you're right, I forgot to apply the patch..

So with this PR applied the scrollbars are always visible, even with *.autoHidesScroller = true.
Sorry to say that I'm not a big fan of that behavior.

@jamshark70
Copy link
Contributor Author

So with this PR applied the scrollbars are always visible, even with *.autoHidesScroller = true. Sorry to say that I'm not a big fan of that behavior.

As noted in #3552, autoHidesScroller is for a totally different feature. (This confused me at first too -- I really should change the issue title.)

  • autoHidesScroller is for the case of a scroll view where either dimension of the canvas area fits completely within the view's visible bounds. If true, the scroll bar for that dimension will not be drawn at all. If false, the scroller will be maintained even though there's nowhere to scroll to. In the Linux/Windows: Scrollbar visibility depends on user's use of the scroll wheel (???) #3552 reproducer, the correct behavior of autoHidesScroller is to keep them visible, because the child view is partially outside the visible area. (It's a misleading name for the method.)

  • The behavior in this issue is sometimes called "fading" the scrollbars out of sight. Currently there is no control for this behavior in sclang. In OSX, there's a system preference. In Linux and Windows, as soon as sclang detects a scroll wheel, it starts to auto-fade. It's this last behavior that I can't understand, especially as it's compulsory -- there is nothing you can do to disable it, except hack the source and build it yourself.

@gusano
Copy link
Member

gusano commented Apr 16, 2018

Still I admit I prefer the transient scrollbars behavior (i.e. which automatically show/hide) than always showing scrollbars.
Looking for a way to change that setting system-wide on linux (it might be Qt theme related) but haven't found it yet..
I feel that having scrollbars always visible because of one use case is a bit too much...

@jamshark70
Copy link
Contributor Author

I feel that having scrollbars always visible because of one use case is a bit too much...

I don't disagree with you, but... it's tied to the scroll wheel.

Go ahead, find somebody who's a bit into computers and try to explain this behavior to them. If they say, "sure, that makes sense," then I'll drop the point.

There are open questions in #3552. Answering those would go further toward resolving this.

@gusano
Copy link
Member

gusano commented Apr 16, 2018

I don't disagree with you, but... it's tied to the scroll wheel.

Go ahead, find somebody who's a bit into computers and try to explain this behavior to them. If they say, "sure, that makes sense," then I'll drop the point.

I agree that I was confused when this feature first appeared (I believe on Mac OS a couple of years ago) but then got used to it: no scrollbars? ah yeah they will only appear when I'm scrolling, fine :)
I also agree that it should be easy to disable that behavior from sclang if possible..

@jamshark70
Copy link
Contributor Author

then got used to it: no scrollbars? ah yeah they will only appear when I'm scrolling, fine :)

But you haven't had the experience of explaining to a student who is using windows why she should rigorously avoid touching the scroll wheel... and being met by that "you're kidding, right?" stare.

@jamshark70
Copy link
Contributor Author

"no scrollbars? ah yeah they will only appear when I'm scrolling, fine :)"

Also, nobody has answered the question of how to use a horizontal scroller when one's mouse has only a vertical scroll wheel.

@gusano
Copy link
Member

gusano commented Jun 16, 2018

how to use a horizontal scroller when one's mouse has only a vertical scroll wheel

Away from my machine right now but the horizontal bar used to appear as soon as the cursor approaches it. Doesn't this work for you?

@jamshark70
Copy link
Contributor Author

Away from my machine right now but the horizontal bar used to appear as soon as the cursor approaches it. Doesn't this work for you?

No, it doesn't. As I stated in the other issue report, on my system, the ONLY way to get the scrollbars to reappear is to touch the scroll wheel, and then I have only a second to grab the handle.

If it worked as you say, then I wouldn't have had to log any issue at all. Part of the problem seems to be that people are assuming that it's easy to get the scrollbars to show up, when my experience is that it's nearly impossible once they disappear. (There appears to be quite some variability in the behavior between systems. You can't assume the scrollbars work exactly the same on my system as on yours.)

I had forgotten to mention that TX Modular features scroll views within scroll views. If you're trying to conjure up a horizontal scroller using a vertical scroll wheel, in that case, it happens quite often that the outer ScrollView pushes the inner view's scrollbar away from the mouse position. So then, the procedure is: touch the scroll wheel to un-fade the scrollbars, quickly move the mouse to find the handle, and hope you did it both quickly and accurately (and if you miss, start over).

@jamshark70
Copy link
Contributor Author

Retested with Qt 5.11. Same behavior. Scrollbars do NOT automatically reappear when you mouse over them.

Copy link
Contributor

@nhthn nhthn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i can repro the original behavior as james described and it's definitely absurd. this fix looks correct.

@telephon telephon merged commit 60919df into supercollider:develop Jun 20, 2018
@jamshark70
Copy link
Contributor Author

We're not quite finished with it because some users do want scrollbars to fade (for that matter, I wouldn't mind it myself if Qt would show them upon mouse-over). There's a loose proposal for that in #3552, but the discussion is missing implementation details. I should probably close that ticket and condense the material.

Anyway, lately I was thinking, the behavior is fundamentally broken on two platforms (or at least window managers), and providing less-broken behavior was being held up by a desire for an extra nicety that works in some places but not others. That doesn't make sense to me. So thank you both for taking the initiative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: Qt GUI sclang Qt components -- for IDE tickets, use "env: SCIDE" instead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants