Skip to content

0.4.8 — Destroyed-widget cleanup, Label icons and wide-field painting

Latest

Choose a tag to compare

@github-actions github-actions released this 16 Oct 02:44
· 1 commit to main since this release

Fixed

  • Fields and buttons stretched across a wide window no longer slow down its painting. Their borders and fills are drawn by repeating a small image across the widget, one draw per repeat, so a stretched widget took longer to paint the wider it was. On Windows, 60 full-width TextFields took 0.96 s to paint in a window 1280 pixels wide, against 0.38 s at 400. The images are now repeated in advance, and the same window paints in 0.23 s. Widgets look and size exactly as before. (#535)
  • A widget destroyed inside a Row or Column now gives up its place. Previously the layout kept a slot for every destroyed child. A list refreshed by destroying its children and building new ones placed the new children after all the old slots, the first with a gap above it, and held on to every destroyed widget, so each refresh added to the total. Destroying the first child left its gap above the child that took its place, and an index= or attach() given right after a destroy counted the destroyed child. Every container that stacks its children, including Card, ScrollView, App and Window, is fixed the same way; Grid was not affected. (#537)
  • Destroying a widget now removes its locale-change handler. Previously every widget that shows localized text left one on its window, holding the destroyed widget in memory. An app that rebuilds its pages grew with every rebuild and built each page more slowly, and the next locale change ran the handlers of every widget it had destroyed: a destroyed Select raised an error, and a destroyed field bound to a shared textsignal= wrote its old value back into the signal. (#538)
  • Giving a Label an icon or image after it is created no longer hides its text. Previously a Label created without icon= or image= showed only the icon or image once label.icon or label.image was assigned, and its text, including text from a textsignal=, stayed hidden from then on. The icon now sits beside the text at icon_position=, as it does when given at construction. (#533)

What's Changed

  • fix(style): paint a stretched image element from a pre-tiled copy of its image (#535) by @ssweber in #536
  • fix(style): register an element's own images when they cannot be pre-tiled by @israel-dryer in #541
  • fix(layout): free a destroyed child's place in a Row or Column (#537) by @ssweber in #539
  • fix(i18n): remove a widget's locale-change handler when it is destroyed (#538) by @ssweber in #540
  • fix(label): keep a Label's text when an icon or image is assigned later (#533) by @israel-dryer in #542
  • fix(layout): keep a detached child's slot when an earlier sibling is destroyed (#543) by @israel-dryer in #544

New Contributors

Full Changelog: v0.4.7...v0.4.8