github beeware/toga v0.5.3
0.5.3

9 hours ago

Features

  • Toga now provides a Qt backend for KDE-based desktops. (#1142, #3914)
  • GTK now provides a DateInput widget. (#1939)
  • Apps can now register a handler that is notified when a window is resized. (#2304)
  • During application startup, the locale will now be set to match the system's language setting. (#2773)
  • GTK apps can now detect if the user has expressed a preference to be displayed in dark mode. (#2841)
  • Table and Tree widgets on desktop platforms can now accept focus programmatically. (#2972)
  • The ActivityIndicator, Box, Button, Canvas, DateInput, Label and TextInput widgets are now supported with GTK4, along with improved container handling and the added handling of icons. (#3069)
  • ListSource.find now has a default parameter which is returned when no match is found. (#3609)
  • Pack now has a font shorthand property for specifying all font properties at once. (#3631)
  • Toga's web backend now provides deployment configuration information as part of the packaged wheel. This information can be used by tools like Briefcase to control how web content will be rendered. (#3666)
  • On macOS, if the text for a column doesn't fit in the available space, a tooltip will be shown with the full text. (#3673)
  • The Android backend now provides an ActivityIndicator widget. (#3729)
  • Support for Python 3.14 was added. (#3867)
  • macOS and iOS WebView widgets now support displaying JavaScript alert() and confirm() dialogs. (#3927)
  • GTK WebView widgets now support the use of SharedArrayBuffer in JavaScript. (#3927)

Bugfixes

  • Buttons and other interactive widgets in scroll containers now respond properly to touch events on iOS when scrolled into view. (#2411)
  • The performance of the asyncio event loop on Winforms has been slightly improved. (#2613)
  • The NumberInput widget now uses the correct localization for decimal separators. (#2773)
  • Deprecation warnings on style handling will no longer be produced when using GTK4 >= 4.10. (#3069)
  • Toga's Winforms wheel is now correctly tagged to indicate that it is x86_64-specific (as it contains an x86-64 DLL for WebView support). (#3179)
  • Registering a font with a name that shadows a built-in font family name now raises an error instead of falling back to the system font silently. (#3567)
  • The minimum width hint of the iOS DateInput and TimeInput widgets will now fit to the actual displayed size of the picker. (#3580)
  • The rgb and hsl classes now have gain a __str__ that uses modern CSS syntax. For rgb this is simply a nice update, but for hsl it corrects color rendering issues when using the web backend. (#3611)
  • On GTK, the scroll position will now be correctly reflected if a MultilineTextInput is programmatically scrolled immediately after changing text content. (#3658)
  • On GTK, mouse drag events are now triggered when modifier keys (e.g. NumLock, Shift) are active. (#3661)
  • On macOS, the origin of non-primary screens is now correctly calculated when screens are not vertically aligned and the same size. (#3667)
  • App path attributes were unintentionally made writable in 0.5.2 (e.g. i.e., app.paths.config = <something> was permitted). This has been fixed. (#3669)
  • The text of OptionContainer tab labels is now guaranteed to be str on macOS, instead of an Objective C String. (#3672)
  • On macOS, pressing Enter or Tab when a row is selected on a table no longer starts row editing mode. (#3673)
  • Backwards compatibility code in Travertino that allows it to function with pre-0.5 versions of Toga has been made more specific, to prevent it from masking other, unrelated errors. (#3683)
  • Running a single-file app without an explicit app name under PDB no longer crashes. (#3686)
  • The interaction between visibility and starting an ActivityIndicator on iOS has been resolved. (#3729)
  • On macOS, the Close and Minimize menu options use the system-provided handlers, ensuring better adherence to system style guides. (#3775)
  • The show/hide cursor test was made more reliable on Winforms. (#3783)
  • OptionContainer and ScrollContainer widgets will now resize continuously during the drag of a parent SplitContainer on macOS. (#3787)
  • The toga-demo app now correctly identifies its icon when run as a Python module. (#3926)

Backward Incompatible Changes

  • In order to better match CSS, the rgb and hsl constructors now silently clip (or in the case of hue, wrap) out-of-range values rather than throwing errors. They also convert them to consistent types: integers for red, blue, green, and hue; and floats for saturation, lightness, and alpha. (#3611)
  • rgb and hsl color objects are now read-only; their r/g/b/a or h/s/l/a attributes can't be altered after creation. Because of this, format conversions (rgb(...).hsl or hsl(...).rgb) can now cache their results, only performing calculations once. "Converting" a color object to its own type (rgb(...).rgb or hsl(...).hsl) now returns the original object, rather than a new instance with the same values. (#3611)
  • Travertino's color-parsing color() function interprets hex strings, e.g. #123, #112233, as well as predefined named colors. Previously, while this was never documented, it also parsed CSS-like declarations like "rgb(...)"; this feature has been removed. (#3611)
  • Previously, Travertino provided an rgba and an hsla class, as well as rgb and hsl subclasses that enforce opaque alpha. In order to better match CSS, there is now no difference between these names; the shorter rgb and hsl are the preferred forms, but rgba and hsla are direct aliases for them. This can have backwards-incompatible implications; for instance, rgba(255, 255, 255, .5).rgb would previously have returned a fully opaque rgb instance, while now it will preserve its alpha channel information. (#3611)
  • Toga (and Travertino) no longer support Python 3.9. (#3682)
  • If an app provides distribution metadata, the app name will be set based on that metadata, rather than using the app ID or module name as an assumed name. If an app explicitly provides an app ID, the app name will be derived from the last part of an explicitly-provided App ID, rather than being implicitly derived from the module name. (#3926)
  • Static Positron apps now apply a Cross Origin Opener policy of same-origin, and a Cross Origin Embedder Policy of require-corp. (#3927)

Documentation

  • Toga's documentation was migrated to Markdown format. (#3719)

Misc

Don't miss a new toga release

NewReleases is sending notifications on new releases.