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

configurable line height #160

Open
pcmehlitz opened this issue Jan 6, 2016 · 3 comments · May be fixed by #433
Open

configurable line height #160

pcmehlitz opened this issue Jan 6, 2016 · 3 comments · May be fixed by #433
Assignees

Comments

@pcmehlitz
Copy link

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)
     }
    ...
@bobbylight bobbylight self-assigned this Jan 9, 2016
@bobbylight
Copy link
Owner

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).

@pcmehlitz
Copy link
Author

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 notifications@github.com 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.

@buko
Copy link

buko commented Oct 11, 2020

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.

bobbylight added a commit that referenced this issue Feb 20, 2022
… line height configurable when word wrap is NOT enabled. Line number list is also updated. Fold indicators do not currently work properly - they only update in the demo app because I've tied '8' and '9' keypresses to tweaking the line height for quick testing. I think what still needs to be done is: fold indicator immediate updating, fold indicator rendering of 'active' fold line, and *everything* when word wrap is enabled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants