Skip to content

Commit

Permalink
better layout
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed Nov 12, 2023
1 parent a948196 commit 8d08289
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions haxe/ui/components/TextArea.hx
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ private class TextAreaLayout extends DefaultLayout {
}

if (vscroll != null && hidden(vscroll) == false) {
vscroll.left = ucx - vscroll.componentWidth + paddingRight;
vscroll.top = paddingTop;
vscroll.left = ucx - vscroll.componentWidth + paddingRight + paddingLeft - borderSize;
vscroll.top = paddingTop + borderSize - 1;
}

if (component.hasTextInput() == true) {
Expand All @@ -129,7 +129,7 @@ private class TextAreaLayout extends DefaultLayout {
}

private override function resizeChildren() {
super.resizeChildren();
//super.resizeChildren();

var hscroll:Component = component.findComponent(HorizontalScroll, false);
var vscroll:Component = component.findComponent(VerticalScroll, false);
Expand All @@ -140,14 +140,14 @@ private class TextAreaLayout extends DefaultLayout {
}

if (vscroll != null && hidden(vscroll) == false) {
vscroll.height = usableSize.height;
vscroll.height = usableSize.height - ((borderSize - 1) * 2);
}

if (component.hasTextInput() == true) {
var size:Size = usableSize;
#if !pixijs
component.getTextInput().width = size.width - 4;
component.getTextInput().height = size.height - 4;
component.getTextInput().width = size.width - 4 - ((borderSize - 1) * 2);
component.getTextInput().height = size.height - 4 - ((borderSize - 1) * 2);
#end

}
Expand Down

0 comments on commit 8d08289

Please sign in to comment.