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

Feature: Set padding between lines in multi-line paragraph #749

Closed
saifalmutory opened this issue May 14, 2018 · 7 comments
Closed

Feature: Set padding between lines in multi-line paragraph #749

saifalmutory opened this issue May 14, 2018 · 7 comments

Comments

@saifalmutory
Copy link

When wrapping text, does not create a new paragraph and this is normal,
But we need to set the padding between the lines in one paragraph
Here the padding is set between paragraphs:

.styled-text-area .paragraph-box .paragraph-text { -fx-padding: 10px 0px 0px 0px; }

What should I do?

@JordanMartinez
Copy link
Contributor

It sounds like you want to be able to set the padding in-between lines in a multi-line paragraph when the text is being wrapped during runtime. Such a feature is not supported at this time.

I think this could be supported (though I'm not sure of all the drawbacks) but would require another generic type in GenericStyledArea for the paragraph type (similar to how we use SEG for a custom segment type).

Such an API might also be easier to implement if TextFlow exposed such a thing.

@saifalmutory
Copy link
Author

"during runtime"!! Does this mean that padding can be set before run-time?

If not please tell me what should I do? This feature is required

@JordanMartinez
Copy link
Contributor

"during runtime"!! Does this mean that padding can be set before run-time?

Nope, not even at compile time.

If not please tell me what should I do? This feature is required

Only one thing and that may take a lot of time. Contribute to OpenJFX and change the TextFlow API to add another CSS property that adds space between rendered lines of wrapped text that does not contain by a newline character.

@saifalmutory
Copy link
Author

Hey my friend

.paragraph-text { -fx-line-spacing:30;}
This thing is already working, why do you say the opposite in wiki?
Update

@saifalmutory
Copy link
Author

saifalmutory commented May 15, 2018

This works on the spacing of the lines in one paragraph and not several paragraphs and This is what we want. correct?

@JordanMartinez
Copy link
Contributor

Wow.... You're right. I wrote that part of the wiki and tested it out, so perhaps I thought it referred to space between multiple paragraphs, not the lines between multi-line paragraphs...? I really don't know how that happened....

Regardless, the wiki has been updated. Thanks for the correction!

@JordanMartinez
Copy link
Contributor

This isn't a feature as much as realizing that the ability for this already existed. However, so that this will show up in the list of new "Features" when a new release is made, I'm labeling this as a enhancement and renaming it to account for that.

@JordanMartinez JordanMartinez changed the title How to set padding between lines ?not between paragraphs!! Feature: Set padding between lines in multi-line paragraph Jun 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants