Phoenix icon indicating copy to clipboard operation
Phoenix copied to clipboard

ScrolledWindow/ScrolledPanel scrolling glitchy with GTK+3

Open stuckyb opened this issue 6 years ago • 14 comments

Operating system: Ubuntu 18.04.1 LTS wxPython version & source: 4.0.1 gtk3 (phoenix), installed via apt-get Python version & source: python 3.6.7, default version with OS

Description of the problem: When a scrolled panel has both horizontal and vertical scrollbars, scrolling to either the bottom or the right edge of the window causes a weird glitch where the window appears to "jitter" or "twitch" in the direction of the scroll.

To see an example of this, try running the DragScroller demo and scroll to the bottom right using either the scroll bars or dragging with the mouse. (The problem is especially noticeable when dragging with the mouse.)

This appears to be a problem with any ScrolledWindow or ScrolledPanel that has two scroll bars. If the ScrolledPanel has only one scroll bar, the glitch disappears.

Thank you for any help you can provide with this!

stuckyb avatar Feb 22 '19 04:02 stuckyb

To follow up on this, I also tested this using python 2.7.15rc1 with wxPython 3.0.2.0 gtk3 (classic), and the results are the same. That makes me wonder if the bug is with wxWidgets, not wxPython.

stuckyb avatar Feb 22 '19 14:02 stuckyb

That makes me wonder if the bug is with wxWidgets

Yes, it likely is.

RobinD42 avatar Feb 22 '19 21:02 RobinD42

To test the origin of the scrolling bug, I grabbed the source code for wxWidgets 3.0.4, compiled it, and then built some of the samples that used wxScrolledWindow. They all exhibited the exact same scrolling glitch as described above. So, it seems pretty clear that this is a problem with wxWidgets.

stuckyb avatar Feb 23 '19 05:02 stuckyb

Please create a ticket for this at https://trac.wxwidgets.org/, if one doesn't already exist, and add a link to the ticket here so we can track it.

RobinD42 avatar Feb 23 '19 06:02 RobinD42

I can't reproduce this on Ubuntu 18.04, or at least I don't understand what the problem is. Are you using the default graphical environment of Ubuntu?

swt2c avatar Feb 23 '19 16:02 swt2c

I am using XFCE (XUbuntu with no graphical customization), but it should still all be GTK+3 widgets, correct? I don't think it is a general problem with GTK+3 on my system, because when I run a GTK application with a dual-scrollbar window that doesn't use wxWidgets (e.g., GIMP), I don't see the scrolling glitch.

stuckyb avatar Feb 23 '19 20:02 stuckyb

Scrollbar functionality may be implemented by the graphical environment (e.g., there have been problems with the scrollbar functionality in Ubuntu's Unity specifically). Does the problem show up if you make a video of it?

swt2c avatar Feb 23 '19 21:02 swt2c

I can give that a try. Do you have a preferred method for making/sharing screengrab videos for issue threads?

stuckyb avatar Feb 24 '19 02:02 stuckyb

Thanks, I just want to make sure I'm trying to reproduce it correctly. You could try attaching it, but I'm not sure what limits GitHub has on attachment sizes. If that doesn't work, I guess you could use some cloud hosting service and provide a link to it.

swt2c avatar Feb 24 '19 02:02 swt2c

I can see this too, wxPython 4.1.0 gtk3 (phoenix) wxWidgets 3.1.4 from https://extras.wxpython.org/wxPython4/extras/linux/gtk3/debian-10) on Devuan 3 (similar to Debian 10) MATE desktop

Jorilx avatar Feb 04 '22 09:02 Jorilx

Running the wxPython demo, I can see this behaviour with the following examples: TreeListCtrl CheckListCtrl ListCtrl ListCtrl_virtual HyperTreeList UltimateListCtrl

It does NOT happen with: DVC_IndexListModel DVC_ListCtrl

Jorilx avatar Feb 04 '22 10:02 Jorilx

Workaround: use the overlay scrollbars (GTK_OVERLAY_SCROLLING=1)

Jorilx avatar Feb 04 '22 11:02 Jorilx

Another workaround (from here ): use style ALWAYS_SHOW_SB

Jorilx avatar Feb 04 '22 15:02 Jorilx

The nice people of wxWidgets fixed the issue! Here

Jorilx avatar Feb 22 '22 07:02 Jorilx