question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Consecutive border/underline styles that are the same are rendered with multiple shapes, not one

See original GitHub issue

Expected Behavior

Overlaying some style spans should not break down the border and box individual spans. The border should be around the original span, not individual spans resulting from the overlay.

Actual Behavior

capture du 2018-03-27 21-48-01

There are two StyleSpans here that are overlayed :

  • One with the border outline and background variation. Each styled span in this layer is applied from opening brace to closing brace (in one continuous span for each block)
  • One with the syntax highlighting.

Overlaying both layers breaks down the big spans with borders into smaller spans around the other styled spans. But the borders are shown around each particular span instead of around the original span, which is undesired. It’s not entirely unexpected given the contract of overlay though, which is why I’m not sure I should submit a bug report. What do you think?

I think, if it’s entirely expected, then one feature that could allow to work around that would be allowing to select the styles of the border for each side, somewhat like -fx-border-style: none solid solid solid;. With that, I could probably adjust the borders of the overlaid spans during the overlaying.

Thanks for any help/ feedback.

Minimal reproducible demo

https://gist.github.com/oowekyala/8319f98f7ed77042e2a4fa0e79116aad#file-app-java

Environment info:

  • RichTextFX Version: 0.8.1
  • Operating System: Ubuntu 16.04
  • Java version: 8

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
JordanMartinezcommented, Mar 28, 2018

Lol… Looks like a copy and past error. It fails because the wrong class is used in the instanceOf check:

private static LineAttributesBase {
 // rest of class
@Override
    public boolean equals(Object obj) {
        if (obj instanceof UnderlineAttributes) {
            UnderlineAttributes attr = (UnderlineAttributes) obj;
            return Objects.equals(width, attr.width)
                    && Objects.equals(color, attr.color)
                    && Arrays.equals(dashArray, attr.dashArray);
        } else {
            return false;
        }
    }
1reaction
JordanMartinezcommented, Mar 28, 2018

I hope to respond to this later today or potentially tomorrow.

Read more comments on GitHub >

github_iconTop Results From Across the Web

border-style - CSS: Cascading Style Sheets - MDN Web Docs
The border-style property may be specified using one, two, three, or four values. When one value is specified, it applies the same style...
Read more >
Styling Underlines on the Web - CSS-Tricks
So what are all the different ways we can underline text on the web? Here are the ones I can think of: text-decoration;...
Read more >
text-decoration: underline vs border-bottom - Stack Overflow
border -bottom puts a line at the bottom of the element box. text-decoration:underline renders the text underlined. The exact difference depends on the...
Read more >
Apply and adjust stroke properties – Figma Help Center
Create custom shapes and edit them in vector edit mode; Combine multiple paths into a single object; Scale vector objects uniformly. Note: It's...
Read more >
Underline cell contents, entire cells, or rows on a worksheet
See how to underline cells or use a border to underline rows in Excel 2010.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found