bobbylight / RSyntaxTextArea

A syntax highlighting, code folding text editor for Java Swing applications.
BSD 3-Clause "New" or "Revised" License
1.12k stars 259 forks source link

Modernize fold icon appearance #458

Closed bobbylight closed 2 years ago

bobbylight commented 2 years ago

Describe the solution you'd like RSTA's fold icons are +/- icons. This is a well-known visual paradigm, but many code editors are moving towards chevrons. While RSTA does currently have methods to assign icons for folded/collapsed states, it would be nice if RSTA had this more modern appearance baked in.

As mentioned earlier, RSTA lets you assign your own icons for fold regions (see setFoldIcons(Icon, Icon)), it does not let you customize the vertical line rendered when an icon is armed/hovered over that shows an expanded fold's region. This effect typically isn't done with chevron folds as that visual style is all about a clean, minimalistic look. Thus we'll need some way to turn off that effect as well to fully implement the chevron style.

Are there any workarounds? None, other than assign custom icons with the current API and live with the armed fold region line.

bobbylight commented 2 years ago

This is available now. See the following new API: