Please note that I have made a crate out of this in the meantime:
This is a quick-and-dirty sample how an application window may be centered using Slint and Rust when using a winit
backend.
Neither do I claim that this is pretty nor working in all cases.