Upgrading to 0.4.x¶
No name was removed or renamed in 0.4.x: code written for 0.3.5 runs unchanged. A few behaviors changed, and each is listed here with the release that changed it, in case your code or tests relied on the old one.
0.4.0¶
- Partial redraw is on. A window repaints only what changed each frame.
Nothing in your code has to say what changed;
window.set(partial_redraw=False)goes back to full redraws, andwindow.get("partial_redraw_active")says whether an open window really redraws partially. See Painting. App.run()raisesRuntimeErrorwhen a window's GPU can't be set up (no adapter, no device, or a surface the adapter can't drive), where the process used to exit or panic. No display at all still returnsNone.Window(0, h)andWindow(w, 0)raiseValueError.- Images larger than
MAX_IMAGE_DIMENSIONon a side are rejected withValueError. - Building from source needs Rust 1.90 or newer.
0.4.1¶
- The mouse's side buttons are reported. They arrive as
pointer_downandpointer_upwithevent.buttonset to"back"or"forward", and, like the middle button, make noclickand move no focus. They used to be dropped. window.set(show_damage=True)tints each frame's redrawn areas, for debugging partial redraw.
0.4.2¶
- Keys scroll. The arrow keys, Page Up/Down, and Home/End scroll the
nearest scroll view around the focused node, unless that node uses the key:
a
key_downlistener anywhere from the focused node up to the scroll view keeps every key, and a text input keeps all but Page Up and Page Down. A widget that reads keys throughkey_downis unaffected. See Keyboard scrolling. - Focus reveals. Focusing a node — by Tab, a click,
node.focus(), or an assistive technology — scrolls the scroll views around it just enough to show it, and Tesserae Engine now answers an assistive technology'sscroll_into_viewrequest itself. A test that focuses a node below the fold and then checks a scroll offset will see it move. - New:
node.scroll_into_view(), thescrollevent, CSS Grid layout (display="grid"), and the Page Up and Page Down keys, which a terminal receives as\x1b[5~and\x1b[6~.
0.4.3¶
- Shortcuts don't scroll. An arrow, Page Up/Down, Home, or End pressed with Ctrl, Alt, or Meta held no longer scrolls the scroll view around the focused node, so it's free for a shortcut such as Ctrl+Page Down. Shift still scrolls.
- A bare number is a one-track list.
grid_auto_rows=96(and the other three track-list properties) now means[96], reading back as"96", where it used to raiseValueError. scroll_offsetis clamped when it's set.set(scroll_offset=...)past the end reads back as the end at once and fires onescrollevent, where it used to read back as set until the next layout clamped it and fired a second.animateto a point past the end eases to the real end. A view created withscroll_offsetfires nothing on its first frame, and its firstscrollevent'sold_valueis that offset, not 0.- Shift+wheel scrolls sideways. With Shift held, a wheel with no
horizontal part scrolls a horizontal scroll view, and a
wheellistener hears it asdelta_x. A wheel that already has a horizontal part (macOS turns Shift+wheel itself) is unchanged, and a terminal's scrollback still follows the wheel. - A wheel passes views it can't move. A wheel over a scroll view or virtual list that doesn't scroll in the wheel's direction goes on to the next one out: a plain wheel over a horizontal carousel now scrolls the page around it, where it used to scroll nothing.
0.4.4¶
- Scrolling chains. A wheel or a scroll key over a scroll view (or a wheel over a virtual list) that can't move in its direction — already at that end, or with nothing to scroll — goes on to the view outside it, as in a browser. A wheel over an inner list at its end now scrolls the page around it, where it used to stop at the list; Page Down at an inner view's end moves the page. A view that can move still takes the whole wheel or key.