LiveSplit / livesplit-core

livesplit-core is a library that provides a lot of functionality for creating a speedrun timer.
https://livesplit.org/
Apache License 2.0
209 stars 56 forks source link

Add resize hint to the Web Renderer #794

Closed CryZe closed 2 months ago

CryZe commented 2 months ago

The web renderer now returns the new size whenever the element is supposed to be resized. This is important so adding or removing a component to the layout or loading a new layout will adjust the size of the element accordingly. This is the same way the other renderers handle it, so we should do the same for the web renderer.

Additionally this fixes a bug in the way the strings got passed from JavaScript to Rust, where we introduced a difference between the length of a string and the capacity of its allocation, but didn't properly differentiate between them everywhere.