-
Notifications
You must be signed in to change notification settings - Fork 236
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
paragraph-box padding works incorrectly #508
Comments
Thanks. That does make things clearer now. |
Here's the layout code in @Override protected void layoutChildren() {
Bounds bounds = getLayoutBounds();
double w = bounds.getWidth();
double h = bounds.getHeight();
double graphicWidth = getGraphicPrefWidth();
text.resizeRelocate(graphicWidth, 0, w - graphicWidth, h);
graphic.ifPresent(g -> g.resizeRelocate(graphicOffset.get(), 0, graphicWidth, h));
} However, if we fix the left padding issue, there's nothing clipping the line. For example, given a padding of 30px where the mouse marks where the padding ends... |
Accounting for padding here will also affect any |
@AlexP11223 Adding padding to this can be done, but do you expect the padding to cover the text when one scrolls to the right? |
I don't know, I solved my original problem using different approach (adding insets handling to the pane, #507). And for that problem I actually wanted to add padding for paragraph + line numbers, not just for text. |
Ah... it seems I misread you then. So you want to add padding to the box itself (which currently doesn't work for top/left padding values), not necessarily the text itself, right? |
Yeah. But I don't know if it would be correct behavior for this padding, and seems like my problem can be solved without it. |
What do you mean? |
That I don't know how it supposed to work by design. |
Ok, so the original issue you raised is, you think, better resolved by the other approach, correct? Still, I think the desired functionality here should be implemented. Someone else might want to use it for various things. |
Looks like left padding of
.paragraph-box
adds spacing at the right, and top padding adds spacing at the bottom.(look at horizontal scrollbar)
The text was updated successfully, but these errors were encountered: