RSyntaxTextArea icon indicating copy to clipboard operation
RSyntaxTextArea copied to clipboard

configurable line height

Open pcmehlitz opened this issue 9 years ago • 3 comments

would it be possible to make the line spacing configurable? It seems to work when using a factor in RSyntaxTextArea.getLineHeight(), as in

  class RSyntaxTextArea ... {
     float lineSpacingFactor = ...
     ...
     @Override public int getLineHeight() {
        return (int)(lineHeight * lineSpacingFactor)
     }
    ...

pcmehlitz avatar Jan 06 '16 18:01 pcmehlitz

Is a multiplier, as you show, sufficient? Allowing the setting of an absolute value seems wrong, since the user may set it too small for the current font(s).

bobbylight avatar Jan 09 '16 19:01 bobbylight

why not just check in the setter if the factor is >=1.0? I see little use for shrinking the line height.

On Jan 9, 2016, at 11:10 AM, Robert Futrell [email protected] wrote:

Is a multiplier, as you show, sufficient? Allowing the setting of an absolute value seems wrong, since the user may set it too small for the current font(s).

� Reply to this email directly or view it on GitHub.

pcmehlitz avatar Jan 09 '16 19:01 pcmehlitz

Just thought I would comment here and +1 this feature.

I was surprised to see that RSyntaxTextArea has a getLineHeight method but no way to increase the line height. The line height is completely controlled by a private calculateLineHeight method. When editing large XML docs would be very nice if we could increase the line height by a factor of 1.0,1.25,1.75,or 2.0. A multiplier I think would be sufficient to handle this:

public void setLineSpacing(double lineSpacing) { ... }

We might limit it a range of 1.0 and some reasonable maximum.

buko avatar Oct 11 '20 06:10 buko