Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 243229 - Introduce a visual delimiter for code folding area
Introduce a visual delimiter for code folding area
Status: RESOLVED FIXED
Product: editor
Classification: Unclassified
Component: Code folding
8.0.1
PC All
: P3 (vote)
: 8.1
Assigned To: Svata Dedic
issues@editor
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-24 22:46 UTC by host
Modified: 2015-07-31 08:35 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments
Without Delimiter (33.16 KB, image/png)
2014-03-24 22:46 UTC, host
Details
With Delimiter (32.60 KB, image/png)
2014-03-24 22:47 UTC, host
Details
Proposed changes (22.31 KB, patch)
2015-05-04 08:51 UTC, Svata Dedic
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description host 2014-03-24 22:46:35 UTC
Created attachment 146279 [details]
Without Delimiter

Currently the area where the code folding elements reside is not visually delimited from the rest of the editor. It would be nice to introduce such a delimiter through a distance background color and delimiting line.

On the example screenshots, the editor window is moved two characters to the right and so one can only see e.g. "ckage" and "port". Without visual delimiter, it is not directly clear that the two characters are to the left of the actual editing area (see first screenshot). With the visual delimiter this is much clearer and directly obvious.
Comment 1 host 2014-03-24 22:47:29 UTC
Created attachment 146280 [details]
With Delimiter
Comment 2 Svata Dedic 2015-04-30 07:04:29 UTC
There are more components in the sidebar than just code folding indicators, enumerating left to right:

* brace matching outline (the gap left to the code folding)
* code folding
* diff outline

1/ the diff sidebar does not seem to allow to customize background color. If it did, you could eventually changed the braces outline, code folding bar and diff sidebar backgrounds to light gray - the same color as the line number background.

2/ For visual consistency reasons, I believe the background of all those sidebars should be the same - and if changed, the color should be ideally changed at one place for all (and possibly other) sidebars.

I propose a slight change in GUI and extending the sidebar with +1 pixel to provide the boundary line as on the screenshot "With delimiter". All the sidebars would be placed into JPanel with settings-configured background + border on the right side configured to settings-defined foreground. The JPanel's fore color would remain the default. This way the current mechanism that inherits colors from Swing hierarchy parents could work.

Please share your opinions; thanks.
Comment 3 Svata Dedic 2015-05-04 08:51:42 UTC
Created attachment 153509 [details]
Proposed changes

Martin & Mila, please review the proposed changes in your modules: I've changed the logic so that sidebars inherit their background color from the parent, editor core configures the surrounding JPanel with the F&C-defined color, or the linenumber bar color + necessary change monitoring.

If no objections are raised, I'll apply the change on Wednesday.
Comment 4 Svata Dedic 2015-05-06 12:49:31 UTC
I've bugfixed :) and changed the attached implementation a little: the coloring defaults to:
* sidebar's background = editor's background
* line numbers set to the current color in layer

This preserves the current color schemes. Users can customize the sidebar overall color and set the line number background to "Inherited".

Implemented in jet-main#f55ab8d5b862
Comment 5 Quality Engineering 2015-05-14 03:07:55 UTC
Integrated into 'main-silver', will be available in build *201505140001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/f55ab8d5b862
User: Svata Dedic <sdedic@netbeans.org>
Log: #243229: Implemented common coloring for sidebar backround
Comment 6 Ondrej Vrabec 2015-07-31 08:35:27 UTC
Svato, this causes diff sidebar to paint improperly on Nimbus: bug 216364


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo