[Lazarus] Folding [Re: Lazarus Release Candidate 1 of 1.2]

Martin lazarus at mfriebe.de
Mon Nov 11 21:46:39 CET 2013


On 10/11/2013 14:48, Florian Klaempfl wrote:
> Am 06.11.2013 20:42, schrieb Martin:
>>> One of my favourite features:
>>>
>>> 'Inactive code in $IFDEF can be "low-lighted" (greyed out)'
>>>
>>> :)
>>>
>>
>> And, if you configure IFDEF to be foldable, and right click the fold
>> gutter part, then you find an option to fold all inactive ifdef.
>
> Nice to see, now my last complaint on folding must be fixed and I'am 
> really happy: the folding header line should be surrounded fully by a 
> rectangle, not only the three dots at the end :)
>

Not finished yet (and may be a while until I continue it), but usable.



Revision 43425

You can hide the yellow and ..., by cahnging the colors for the fold 
marker in the editor options.
The new frame will still extend to the same position.... (so it does not 
go to the right end of the editor)

There is no config, so you need to set the color in the source

components\synedit\syneditfoldedview.pp
Line 3720

  FMarkupInfoFoldedCodeLine := TSynSelectedColor.Create;
   FMarkupInfoFoldedCodeLine.Background := clNone;
   FMarkupInfoFoldedCodeLine.Foreground := clNone;
   FMarkupInfoFoldedCodeLine.FrameColor := clNone; //<<<<<<<<<<< change 
this for a frame

   FMarkupInfoHiddenCodeLine := TSynSelectedColor.Create;
   FMarkupInfoHiddenCodeLine.Background := clNone;
   FMarkupInfoHiddenCodeLine.Foreground := clNone;
   FMarkupInfoHiddenCodeLine.FrameColor := clNone;

You can also set Alpha, priority and linestyle.

eg if I do
   FMarkupInfoFoldedCodeLine.FrameColor := clMaroon;
   FMarkupInfoFoldedCodeLine.FrameEdges := sfeBottom;
then I get:

---------------------------
There are 2 settings,
1) FMarkupInfoFoldedCodeLine. lines with a fold starting (the fold 
header line is visible)
2) FMarkupInfoHiddenCodeLine. lines with a "hide" starting (nothing visible)

Hide usually applies, if you select random text, and fold all the lines 
in the selection.
Hide is also available for comments, so you do not even see the first 
line of the comment

IMHO, a frame for "hide" is not good, because it would frame around an 
unrelated line.
Of course a frame can be used, that only has a bottom-edge (FrameEdges = 
sfeBottom). Then it is like an underline.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20131111/c63a416a/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ibbhhcjh.png
Type: image/png
Size: 3515 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20131111/c63a416a/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dcfhieig.png
Type: image/png
Size: 3601 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20131111/c63a416a/attachment-0007.png>


More information about the Lazarus mailing list