You Got A Question? Ask    GNOME Community!


What GTK 3.8 will bring for developers

This post was made with an older stylesheet


What is GTK? 

GTK is the multi-platform widget toolkit that originates from GIMP. Gnome developers maintain and use it for creating the graphical user interface that we all use everyday. GTK follows the same version numbering as Gnome, and all of Gnome’s official applications and tools use it in its latest version, so Gnome 3.8 will be using GTK 3.8.


3.8 Changes

  • Per-widget opacity with gtk_widget_set_opacity

This new ability of GTK came in the development version 3.7.10 and allows developers to set an opacity to any GtkWidget, instead of  just toplevels that was the case till then.

  •  Frame synchronization with mutter for smooth animations and resizing

This means applications will throttle their drawing cycle to what the compositor is drawing, and the compositor will never render half-updated windows, for seamless resizing and improved smoothness in drawing. For more detailed technical info about the frame synchronization you can check this blog and this post.

  • Single-click mode for tree and icon views
  • Possible to reuse accessible implementations
  • Multi-application Broadway support with broadwayd
  • Better font support

The default font is no longer handled like a custom style sheet that overrides everything, but as the initial value. It is also possible now to set font-family and font-size like other CSS properties, and relative font sizes are supported. Font sizes in CSS can be specified as numbers or with keywords like xx-small, medium, smaller, larger.

  • Implementations for touch devices

There is now support for touch friendly popups on entries and text views in place of context menus since development version 3.7.12. The touch event was added to GtkToolPalette since 3.7.10.

  • New function: gdk_window_set_fullscreen_mode

This new function allows windows to be fullscreened across multiple monitors.

  • Performance improvements

Version 3.7.4 brought many noticable performance improvements. Size allocation has been optimized, by avoiding excessive resizing in various situations, performance of size groups has been improved, text rendering in GtkLabel and other widgets has been optimized to avoid excessive recreation of Pango layouts, Icon loading overhead was reduced by caching of GtkIconInfo and CSS is now keeping a tree of selectors to speed up matchinh.

  • Many more little additions and improvements plus over 140 bug and memory leak fixes

Ideas for 3.10?

Although it is still too early to speak about version 3.10, ideas include the following four new widgets for the next GTK version: list box, flow box, stack, header bar.

  GTK+ Website


 
  We can't watch comments unless G+ provides an API or if you send a notification, e.g +World Of Gnome
     Sometimes is better to place your questions on GNOME Community
  • Evropi

    Ideas for 3.10? Deprecate in favour of Qt 5.

    If only Qt was ‘liberated back in 1998 or whenever it was, we wouldn’t be having this identity crisis between two unequal toolkits. :( Great work GTK team, but it’s impossible to catch up to Qt at this point, Digia is being a truly great steward.

    • Adrián avila

      What you fail to understand, is that GTK is designed to work with GNOME well, Qt is designed to work with whatever is used, and another point, is that the GNOME devs can control the GTK destininy and that is a plus, to have a control of the destiny toolkit you use is essencial, that is something KDE doesn’t havem and IMHO is the main reason of KDE’s failure.

      • Evropi

        KDE is hardly a failure. And guess what, KDE can fork Qt at any time and will do so if it becomes closed source. Not to mention that it is a great contributor to Qt.

        GTK is used by loads of applications. In fact, GNOME’s control over GTK3 has become extremely unpopular as the toolkit is now said to closely mimic GNOME, which has led many developers to revolt. That’s a weakness of GNOME, as ultimately it was third-party developers that made GTK successful (just as it was the case with Qt), not GNOME.

        I never said GTK sucks, I just said Qt is superior and just keeps getting further ahead of GTK.

        • Adrián avila

          IMHO KDE is a failure if you don’t share the same opinion, is OK, and certaintly KDE can fork Qt, but they haven’t, why? I don’t know, but it would be better for them to have control of the same toolkit they use, and this is not a contest of popularity of toolkits, is as context of what toolkit is better for the goals of a specific project. Qt implements some things GTK doesn’t, but I don’t see one that is relevant for GNOME or GKT. That’s the advantage of having control the toolkit you use, you implement what you need, you deprecate what you must w/o asking to anybody, you refactor as your placer, KDE can’t do this.