Ubuntu – How to enable overlay scrollbars in the app

11.04application-developmentoverlay-scrollbarsprogrammingpygtk

I'm testing my app in Natty 2nd beta, in which most applications are showing the new overlay scroolbars, I guess only non-native GTK apps can't show it (like LibreOffice or Firefox).

My app is coded using Python and pygtk so I thought the overlay scrollbars should be enabled by default but I was wrong. I tried to set the environment variable LIBOVERLAY_SCROLLBAR to 1 in both terminal (previously to the app command) and inside the python code via os.putenv(), but it's still showing the old-fashioned scrollbars.

What am I doing wrong?

Best Answer

You should use gtk_scrolled_window widget because is the only widget that support overlay scrollbars.

Source https://wiki.ubuntu.com/Ayatana/ScrollBars

If it doesn't work try with:

sudo su
echo "export LIBOVERLAY_SCROLLBAR=1" > /etc/X11/Xsession.d/80overlayscrollbars