Patch for SC_MARK_BAR to have a minimum width
Mitchell <[email protected]> Tue, 8 Apr 2025 12:22:37 -0400
| Newsgroups | gmane.comp.lib.scintilla.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Neil,
I like to use a thin margin for markers in conjunction with SC_MARK_LEFTRECT. If I enable change history, the change history markers are drawn a single pixel in width. I’d like to propose a minimum width: 4 pixels (2 for the left and right foreground border, and 2 for the background fill). I know I can redefine the change history markers, but I think SC_MARK_BAR has benefits for wrapped lines and stuff that SC_MARK_LEFTRECT does not have.
src/LineMarker.cxx:
```
case MarkerSymbol::Bar: {
PRectangle rcBar = rcWhole;
- const XYPOSITION widthBar = std::floor(rcWhole.Width() / 3.0);
+ const XYPOSITION widthBar = std::max(std::floor(rcWhole.Width() / 3.0), 4.0);
rcBar.left = centreX - std::floor(widthBar / 2.0);
rcBar.right = rcBar.left + widthBar;
```
Cheers,
Mitchell
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/scintilla-interest/58C661A0-415F-462E-914C-9B9650902BEC%40foicica.com.