(feat) Make the code-folding gutter configurable via styles and options - #52
Open
rakasha681 wants to merge 1 commit into
Open
(feat) Make the code-folding gutter configurable via styles and options#52rakasha681 wants to merge 1 commit into
rakasha681 wants to merge 1 commit into
Conversation
Add a "folding" style element and an Editor Options toggle so the fold gutter's appearance and availability can be customized, building on thenew folding feature. Style-driven appearance (FoldingManager, styles/*.xml): - Fold icon color now reads <folding fgColor="..."/> from the active style instead of a hardcoded gray, resolved the same way as syntax colors and refreshed live on a theme change. - Icon shape is selectable via shape="triangle" (default) or shape="plusminus" for boxed +/- markers. - Always-on guide lines run from each expanded block's icon down to its end line (with an end foot), colored by <folding guideColor="..."/>, defaulting to the icon color dimmed toward the editor background. - All bundled themes gain a <folding> element with instructional comments documenting these attributes; dark ships with plusminus as a default. Enable/disable option (OptionsShell, Config, EditorComposite, MainShell): - New "Enable code folding" checkbox under "Display line numbers", defaulting to enabled. When off, editors open without a FoldingManager, so icons, hotkeys, the fold gutter, and unfold-on-save all go inert via the existing null-guards. - Disabling and saving unfolds all open editors and tears down their fold gutter live (FoldingManager now unregisters its listeners on dispose); enabling applies on next editor open to preserve listener ordering. - The setting is stored inverted (foldingDisabled) so existing serialized configs, which predate the field, still default to enabled.
Collaborator
|
WOW that was fast :D I'll take a look. Thanks !! Bruce |
Contributor
Author
|
wasn't much to it, i tried to make it in before you merged, but just missed it, so added the couple other bells and whistles related to it, which was mostly just cut and paste from my clone since it was already set up in that one :D Let me know if any tweaks are needed, but i haven't had any issues with it in testing the past few weeks. Should wrap up the closure of #34 :) |
Collaborator
|
:) I'll test this for another week, then I'll pull the commit. Thank you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a "folding" style element and an Editor Options toggle so the fold gutter's appearance and availability can be customized, building on thenew folding feature.
Style-driven appearance (FoldingManager, styles/*.xml):
Enable/disable option (OptionsShell, Config, EditorComposite, MainShell):