GTK 4.6 graphics toolkit available

After four months of development, the release of a multi-platform toolkit for creating a graphical user interface has been published - GTK 4.6.0. GTK 4 is being developed as part of a new development process that attempts to provide application developers with a stable and supported API for several years that can be used without the fear of having to rewrite applications every six months due to API changes in the next GTK branch.

Among the most notable improvements in GTK 4.6 are:

  • The old OpenGL-based rendering engine has been removed, replaced by the new NGL rendering engine, provided by default since GTK 4.2, which provides better performance. NGL renamed to GL. Texture loading code has been rewritten, support for image formats and color spaces has been improved.
  • The code associated with calculating element sizes and widget layout has been significantly reworked. Previously, the GtkWidget::halign and GtkWidget::valign properties were based on the default widget size when placing elements, which, when specifying only one size in area-fill mode, could result in the element taking up additional space. GTK 4.6 introduces the ability to measure missing size relative to each other (for example, if a width is specified, placement can take into account the available height), allowing widgets to be thinner without taking up unnecessary space.
    GTK 4.6 graphics toolkit available
    GTK 4.6 graphics toolkit available
  • The GtkBox widget has the ability to calculate the individual size of child elements. Whereas previously space was distributed equally among child widgets based on their default size, GTK 4.6 now takes the actual size of children into account when outputting.
  • The GtkLabel widget includes support for text wrapping on any number of lines, allowing you to create narrow labels that take up available vertical space.
  • The GtkWindow class has added the ability to adjust the minimum size to the aspect ratio, which allows you to arbitrarily resize the window without fear of it being too small. Added "Window.titlebar" property.
  • Added a new warning about size mismatches if the widget returns an incorrect size. Gtk-CRITICAL **: 00:48:33.319: gtk_widget_measure: assertion 'for_size >= minimum opposite size' failed: 23 >= 42
  • The GtkTextView widget now supports right-aligned or center-aligned tabs. Added support for text conversion and line height considerations. Improved scrolling to specified label operation. Improved handling of undoing changes. Resolved issues when pasting text from the clipboard and choosing where to display the Emoji paste interface.
  • The GtkMenuButton widget provides the ability to define its own child elements.
  • Template precompilation has been accelerated in GtkBuilder.
  • Added activate signal to activate GtkComboBox and GtkDropDown widgets.
  • Added the show-arrow property to the GtkDropDown widget to control whether the arrow is shown.
    GTK 4.6 graphics toolkit available
  • Added use-markup attribute to GtkPopoverMenu to use Pango markup in menu text.
  • The style system supports the CSS properties font-variant-caps for displaying small capital letters and text-transform for transforming text.
  • Added GtkSymbolicPaintable interface to control the color of symbol icons.
  • Support for tracking Drag-and-Drop operations has been added to the inspection interface, the current input module has been shown, a clipboard content viewer has been added, a graph for visualizing gtk_widget_measure() has been implemented, and the ability to log events has been provided. Added support for Drag-and-Drop mode to the gtk4-node-editor utility.
  • For Wayland, a setting has been implemented to activate the high-contrast mode. Added support for the wl_seat v7 protocol.
  • Added gtk-hint-font-metrics setting to bring text rendering closer to GTK3 behavior.
  • For X11-based systems, added support for touchpad control gestures (when using XInput 2.4) and improved window title-drag behavior.
  • The GDK library, which provides a layer between GTK and the graphics subsystem, has improved checking for OpenGL and OpenGL ES versions. Added support for HSL color space. When loading textures and processing image formats, the libraries libpng, libjpeg and libtiff are directly involved. The EGL initialization code has been moved to the frontend side. Added new APIs: gdk_texture_new_from_bytes, gdk_texture_new_from_filename, gdk_texture_download_float, gdk_texture_save_to_png_bytes, gdk_texture_save_to_tiff, gdk_texture_save_to_tiff_bytes and gdk_display_create_gl_context.
  • The β€œmaster” branch in the Git repository has been renamed to β€œmain”.

Source: opennet.ru

Add a comment