Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add stylebox to multiline input #5496

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LetterN
Copy link
Contributor

@LetterN LetterN commented Oct 16, 2024

title. only tested with OpenDream, code is from LineEdit

Copy link
Member

@PJB3005 PJB3005 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't this just be done by wrapping the TextEdit in a PanelContainer?

Comment on lines 788 to 800
protected override Vector2 ArrangeOverride(Vector2 finalSize)
{
var size = base.ArrangeOverride(finalSize);
var style = _getStyleBox();
var box = UIBox2.FromDimensions(Vector2.Zero, finalSize);
_renderBox.Arrange(style.GetContentBox(box, 1));

var renderBoxSize = _renderBox.Size;

_scrollBar.Page = renderBoxSize.Y * UIScale;

UpdateLineBreaks((int)(renderBoxSize.X * UIScale));

return size;
return finalSize;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're no longer arranging the vertical scroll bar here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants