mojira.dev
MC-297972

Dialog body content is misaligned

Steps to reproduce:

  1. Open a world in creative mode

  2. Run the following command: /dialog show @s {"type":"minecraft:dialog_list","title":{"text":"Example"},"button_width":300,"dialogs":"minecraft:custom_options"}

  3. Reduce the width of the window progressively

Observed results:

  • The button in the dialog is off-center, approximately by the size of the warning button

Expected results:

  • The dialog contents is centered on the screen

Linked issues

Attachments

Comments 3

I believe this is caused by the scrollbar, since the body appears to be centered when including the width of the scrollbar (and space between scrollbar and body). This padding of 10 exists regardless of whether there is a scrollbar.

And buttons and texts in dialog are all not centred (if you see the button of the footer and things of the body, any body elements are not centred)

Can confirm

(in the screen it’s the crosshair, not the cursor)

[media]

slicedlime

boq

Confirmed

Platform

Normal

Commands, UI

25w20a

1.21.6 Pre-Release 3

Retrieved