Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/04/14 17:14:01 (9 years ago)
Author:
jkarder
Message:

#2262: applied some of the changes suggested by swagner in comment:17:ticket:2262

  • added highlighting of current line
  • added error markers and bookmarks
  • fixed <Ctrl> + <Backspace> bug
  • minor code changes
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.CodeEditor/3.3/ErrorBookmark.cs

    r11171 r11657  
    2525namespace HeuristicLab.CodeEditor {
    2626  public class ErrorBookmark : Bookmark {
     27    private readonly Brush brush;
    2728
    2829    public override bool CanToggle { get { return false; } }
    2930
    3031    public ErrorBookmark(IDocument document, TextLocation location)
     32      : this(document, location, Color.Red) { }
     33
     34    public ErrorBookmark(IDocument document, TextLocation location, Color color)
    3135      : base(document, location) {
     36      brush = new SolidBrush(color);
    3237    }
    3338
    34     public override void Draw(IconBarMargin margin, System.Drawing.Graphics g, System.Drawing.Point p) {
     39    public override void Draw(IconBarMargin margin, Graphics g, Point p) {
    3540      int delta = margin.TextArea.TextView.FontHeight / 4;
    3641      Rectangle rect = new Rectangle(
     
    3944        margin.DrawingPosition.Width - 6,
    4045        margin.TextArea.TextView.FontHeight - delta * 2);
    41       g.FillRectangle(Brushes.Red, rect);
     46      g.FillRectangle(brush, rect);
    4247      g.DrawRectangle(Pens.White, rect);
    4348    }
Note: See TracChangeset for help on using the changeset viewer.