Forum > Suggestions

SynEdit and gutter — tight in there

<< < (3/3)

furious programming:

--- Quote from: Martin_fr on March 15, 2023, 05:38:34 pm ---IMHO that is way to much to be there as default (build in).
--- End quote ---

I don't know if you understood me correctly. The SynEdit component already allows you to configure most of what I would need — it has properties for setting side gutter paddings and supports reordering parts. You put so much effort into creating a great, functional and customizable gutter, but you hide the possibility of configuring it only because ”it will be too much”?

Sorry, but that sounds ridiculous. Not only do you throw your work down the drain, but you also take away the ability of Lazarus users to customize the appearance of the IDE to their own needs. There are plenty of options for setting the appearance of the code in the editor, and practically nothing for the gutter.

I asked for the ability to change the order of the gutter parts, because I would like to have a change marker on the far left. On the other hand, I am asking for paddings because for me the parts of the gutter are too close to each other, which makes the gutter difficult to read. That's it, normal and need configuration, nothing extraterrestrial.

furious programming:
Ok, for now I manually changed the look of the gutter by modifying the code responsible for creating SynEdit — file Lazarus\ide\sourceeditor.pp, method TSourceEditor.CreateEditor:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TSourceEditor.CreateEditor(AOwner: TComponent; AParent: TWinControl);{...}Begin  {...}     with FEditor do begin      Name:=NewName;      Text:='';      Align := alClient;      Visible := False;      BookMarkOptions.EnableKeys := false;      BookMarkOptions.LeftMargin:=1;      BookMarkOptions.BookmarkImages := SourceEditorMarks.ImgList;      Gutter.MarksPart.DebugMarksImageIndex := SourceEditorMarks.SourceLineImg;      WantTabs := true;      ScrollBars := ssAutoBoth;       Gutter.LeftOffset  := 4; // 4px left padding.      Gutter.RightOffset := 8; // 8px right padding.      Gutter.Parts.Move(2, 0); // moves the "changes" marker to the far left.       // IMPORTANT: when you change below, don't forget updating UnbindEditor      OnStatusChange := @EditorStatusChanged;      {...} 
Paddings are not yet implemented by the gutter part class, so I won't do anything about it. Anyway, now the gutter looks more or less what I want, it's more readable. Please implement paddings for the gutter part and let us freely configure gutter from the IDE options window.

I do understand you.

And as I stated:

- I have no problem if this is added via OPM package. That should be possible (it would be stored in its own config)
- I have no problem if another team member, thinks it should be in the core IDE; and if they add it.

If I put it into the core, then I have to take responsibility for it => I wont.

As for "patch or merge request".

At this time, I wont be able to fit any of it into my schedule.
If at a later time I will be able to do some of it myself, I might do (a subset of) what I described.

furious programming:
Issue created —


[0] Message Index

[*] Previous page

Go to full version