View Issue Details

IDProjectCategoryView StatusLast Update
0032622LazarusPackagespublic2018-01-11 04:42
ReporterBBaz Assigned ToMartin Friebe  
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
Product Version1.6.4 
Summary0032622: SynEdit TSynGutterMarks does not display all the visible images set for a line
DescriptionSee http://forum.lazarus.freepascal.org/index.php/topic,38741.msg264171.html#msg264171

On a new synedit, set the gutter marks part width so that several images could be displayed then add several images. Only one is shown.
Steps To ReproduceRun the project attached to this issue.
TagsNo tags attached.
Fixed in Revision
LazTarget
Widgetset
Attached Files

Activities

BBaz

2017-10-29 07:54

reporter  

markpart.tar.gz (69,038 bytes)

Martin Friebe

2017-10-29 17:23

manager   ~0103809

I fixed a small part of it in r56234 (marked to be merged to 1.8)

There are several issues.

* 1)

The one in r56234 is that the rect would always progress to the end of available space after the first none-bookmark image. (max() vs min())

* 2)
Another issue (not yet fixed) is, that the column count (how many images fit on a line) will be calculated from the width of bookmark images.
- There is only one width for all marks, all marks must have the same width.
- If there are no bookmark images, then the column width is equal the gutter part => meaning 1 column only.

For that it is necessary to set
  ImageListEmpty.Width := 20; // or whatever the desired width is.
  SynEdit1.BookMarkOptions.BookmarkImages := ImageListEmpty;

Not yet decided, if support for variable mark-width will be added.

* 3)
img := CurMark.ImageList
img.Draw(Canvas, aRect.Left, aRect.Top, CurMark.ImageIndex, True);

Does not seem to clip the image, if the rect is smaller. (at least win32)

This means, that part of the image may be painted to the next line, and may show, depending on caret movement inside the Edit.

Current workaround: Make sure images fit on the line.

BBaz

2018-01-11 04:42

reporter   ~0105653

Yeah, i see, the first column is always empty. That's nonetheless already usable.

Issue History

Date Modified Username Field Change
2017-10-29 07:54 BBaz New Issue
2017-10-29 07:54 BBaz File Added: markpart.tar.gz
2017-10-29 15:35 Martin Friebe Assigned To => Martin Friebe
2017-10-29 15:35 Martin Friebe Status new => assigned
2017-10-29 17:23 Martin Friebe Note Added: 0103809
2018-01-11 04:42 BBaz Note Added: 0105653