An early view of GTK+ 3.16

A number of new features have landed in GTK+ recently. These are now available in the 3.15.0 release. Here is a quick look at some of them.

Overlay scrolling

We’ve had long-standing feature requests to turn scrollbars into overlayed indicators, for touch systems. An implementation of this idea has been merged now. We show traditional scrollbars when a mouse is detected, otherwise we fade in narrow, translucent indicators. The indicators are rendered on top of the content and don’t take up extra space. When you move the pointer over the indicator, it turns into a full-width scrollbar that can be used as such.

Other new scrolling-related features are support for synchronized scrolling of multiple scrolled windows with a shared scrollbar (like in the meld side-by-side view), and an ::edge-overshot signal that is generated when the user ‘overshoots’ the scrolling at either end.

OpenGL support

This is another very old request – GtkGLExt and GtkGLArea have been around for more than a decade.  In 3.16, GTK+ will come with a GtkGLArea widget.

Alex’ commit message explains all the details, but the high-level summary is that we now render with OpenGL when we have to, and we can  fully control the stacking of pieces that are rendered with OpenGL or with cairo: You can have a translucent popup over a 3D scene, or mix buttons into your 3D views.

While it is nice to have a GLArea widget, the real purpose is to prepare GDK for Emmanuele’s scene graph work, GSK.

A Sidebar widget

Ikey Doherty contributed the GtkSidebar widget. It is a nice and clean widget to turn the pages of a GtkStack.

sidebar
IPP Printing

The GTK+ print dialog can now handle IPP printers which don’t provide a PPD to describe their capabilities.

Pure CSS theming

For the last few years, we’ve implemented more and more CSS functionality in the GTK+ style code. In 3.14, we were able to turn Adwaita into a pure CSS theme. Since CSS has clear semantics that don’t include ‘call out to arbitrary drawing code’, we are not loading and using theme engines anymore.

We’ve landed this change early in 3.15 to give theme authors enough time to convert their themes to CSS.

More to come

With these features, we are about halfway through our plans for 3.16. You can look at the GTK+ roadmap to see what else we hope to achieve in the next few months.

13 thoughts on “An early view of GTK+ 3.16”

  1. I noticed the unfocused theme seems to have been lost in 3.14 – is it coming back?

    eg all blue elements (like highlighting which file is selected in nautilis) used to turn grey in 3.12 when the window lost focus.

    1. We choosed not to that anymore, to make unfocused windows more readable, so we just make things flat and dimmed now, maintaining colors there.

  2. narrow scrollbars without mouse because it is easier to spot scrollbar, when you don’t have mouse ? wtf

    1. It works very similarly to the mobile os’s.
      It acts primarily as a position reminder of where you are in the document, but can also, hopefully, be grabbed directly to allow very fast scrolling.

    2. I believe the intent is that if you have a touch screen and not a mouse that you don’t want the scroll bar to be taking up space because you will be using drag scrolling.

  3. These are all fantastic achievements. GSK is especially exciting.
    However, what can be done about gnome’s reliance on Cairo? Is there any way to provide a skia backbend? http://events.linuxfoundation.org/sites/events/files/slides/skia-elce-slides.pdf

    It already has a tremendously efficient rasterizer, but also a gl backend in good standing. This could, eventually, provide a way forward to nearly fully accelerated GPU glyph handling as Google has been doing a good deal of work in that area.

  4. Does the 100% CSS theming mean I can provide a user stylesheet to make custom adjustments for my login?

    I’m particularly interested in making the scrollbar wider, the resizer area around each resizeable window visible and thick (easier for me to mouse over and use), and making window control buttons (minimize, maximize, close) larger.

    If these things are possible (or will be) how can I do this without modifying an installed theme? I’d prefer to supply my own user stylesheet I can place somewhere in my home directory so I can apply it regardless of what theme I pick and it will remain there across theme upgrades.

    Thanks.

    [WORDPRESS HASHCASH] The poster sent us ‘0 which is not a hashcash value.

    1. I think you can already do this by putting the things you want to change in ~/.config/gtk-3.0/gtk.css.

  5. I want this overlay-scrollbars even if GNOME has detected a mouse. I don’t see any reason for a fallback to always visable scrollbars if a mouse has a scrollwheel. At least it should be an option (e.g. in gnome-tweak-tool).

    1. I have found that on another OS, horizontal scrolling doesn’t really work using a scroll wheel when the scrollbars are hidden.

Comments are closed.