Button icons in ActionFormData are misaligned (@minecraft/server-ui)
Partner Rank:
N/A
Verification Builds:
26925527 UWP
Regression Builds:
Unknown - Been like this forever, I think?
Summary:
Button icons in ActionFormData are misaligned (@minecraft/server-ui).
Affects currently Live Content:
Yes
Impact:
The UIs in our content look broken and are not pixel-perfect.
Repro Steps:
- Create an ActionFormData instance using @minecraft/server-ui.
- Add some buttons with icons.
- Load in the game.
Observed Results:
- Custom icons used in @minecraft/server-ui are misaligned by 2 pixels. This looks broken.
- The root cause can be seen here (ui/server_form.json):
- https://github.com/Mojang/bedrock-samples/blob/0c4deaf5a6de9a82797389a2cdfa6d624591b6c0/resource_pack/ui/server_form.json#L165 (an offset of [-2, 0] is being applied).
- The icons don't align nicely with the other buttons that do not have icons. It looks messy.
Expected Results:
- Custom icons used in @minecraft/server-ui should align nicely with buttons that don't have icons. We can not correct this ourselves in Add-Ons.
Screenshots/Videos attached:


Notes: