Vertically alignChildren in ScriptUI does not align properly
In the ScriptUI documentation, there is an alignChildren attribute: "Tells the layout manager how to align children of this container that are not of the same size in a column or row". The issue of vertical alignment of UI objects in the scripts dialog box persists from version to version of Illustrator.
As we can see in the image, only the top alignment seems to be correct. The center alignment is shifted up, and the bottom alignment does not reach the bottom. At the same time, native UI dialogs contain the correct alignment. Thus script interfaces always look less professional.
var dialog = new Window("dialog");
dialog.text = "Test";
dialog.orientation = "column";
dialog.alignChildren = ["fill","top"];
dialog.spacing = 10;
dialog.margins = 16;
var group1 = dialog.add("group");
group1.orientation = "row";
group1.alignChildren = ["fill", "center"];
group1.spacing = 10;
group1.margins = 0;
var checkbox1 = group1.add("checkbox", undefined, "Checkbox");
var button1 = group1.add("button", undefined, "Cancel", {name: "cancel"});
var button2 = group1.add("button", undefined, "Ok", {name: "ok"});
dialog.show();