ui: improve resize support