feathersui / feathersui-openfl

Cross-platform graphical user interface components for creative frontend projects — powered by Haxe and OpenFL
https://feathersui.com/
Other
162 stars 17 forks source link

FormItem.textPosition=LEFT and FormItem.horizontalAlign = JUSTIFY do not goes at same time #151

Closed rat-moonshine closed 1 year ago

rat-moonshine commented 1 year ago

When a formItem used in this manner:

formItem.textPosition = LEFT;
formItem.horizontalAlign = JUSTIFY;

formItem.horizontalAlign overpowers formItem.textPosition - this almost disappears the formItem.text when application runs except a few grey dots:

image

Here's the basic code I tested with:

layout = new VerticalLayout();

var form = new Form();
form.layoutData = new VerticalLayoutData(60, 100);
this.addChild(form);

var formItem1 = new FormItem();
formItem1.textPosition = LEFT;
formItem1.horizontalAlign = JUSTIFY;
var messageText = new Label('The selected user(s) will be disabled by two methods: 1.Clear the HTTPPassword in the user document. 2.Add the user to the group called "DisabledUserGroup", and put this group in the "DenyAccess" list for the server.');
messageText.wordWrap = true;
formItem1.content = messageText;
form.addChild(formItem1);

var formItem2 = new FormItem("Users");
formItem2.textPosition = LEFT;
formItem2.horizontalAlign = JUSTIFY;
var textInput = new TextInput();
formItem2.content = textInput;
form.addChild(formItem2);

var formItem3 = new FormItem("Text Area");
formItem3.textPosition = LEFT;
formItem3.horizontalAlign = JUSTIFY;
var ta = new TextArea();
ta.height = 50;
formItem3.content = ta;
form.addChild(formItem3);

var formItem4 = new FormItem("Container");
formItem4.textPosition = LEFT;
formItem4.horizontalAlign = JUSTIFY;
var container = new LayoutGroup();
container.backgroundSkin = new RectangleSkin(SolidColor(0xffff00));
container.height = 50;
formItem4.content = container;
form.addChild(formItem4);
joshtynjala commented 1 year ago

I've done some investigation, and I can see that FormItem doesn't handle content that resizes when its width is constrained. I'll try to get this fixed next week.