[BLUEJ-962] Width of scope highlight background
If you open up a class with a long line in 3.1.7, the scope highlight used to be as wide as the longest line. However, due to the lack of a JavaFX font metrics equivalent, it's more awkward to reliably measure a string's width (although we do it in the Stride side). So currently in the new Java editor, the width is set to be the width of the window, which looks good, until you horizontally scroll at which point it looks slightly odd. There's a few options to fix this:
- Keep as is; width is determined by the width of the window, which provides a visible right border, and long lines + horizontal scrolling are just oddities
- Always make the border be at the right edge of the window; when you scroll right, the border moves right. Will look nice, although will require redrawing all borders on horizontal scroll (not just window resize as now)
- Do the font measurement and calculate the width of the longest line; draw at that width
- Ditto, but draw at larger of (current window width, longest line width)
(This may be one of the issues that could be pushed to 4.1.1.)
Issue metadata
- Issue type: Bug
- Priority: Medium
- Fix versions: 4.5.0