Ejemplo n.º 1
0
            protected override bool OnMotionNotifyEvent(EventMotion evnt)
            {
                TooltipText = null;
                if (dragPosition >= 0)
                {
                    int x, y;
                    widget.GetPointer(out x, out y);
                    int newWidthRequest = widget.Allocation.Width - x;
                    newWidthRequest = Math.Min(widget.Allocation.Width - (int)widget.Editor.TextViewMargin.XOffset, Math.Max(leftSpacer, newWidthRequest));

                    WidthRequest = newWidthRequest;
                    QueueResize();
                }
                int startLine = widget.Editor.YToLine(widget.Editor.VAdjustment.Value + evnt.Y);
                var ann       = startLine > 0 && startLine <= annotations.Count ? annotations[startLine - 1] : null;

                if (ann != null)
                {
                    TooltipText = GetCommitMessage(startLine, true);
                }

                highlightPositon = evnt.Y;
                if (highlightAnnotation != ann)
                {
                    highlightAnnotation = ann;
                    widget.QueueDraw();
                }

                return(base.OnMotionNotifyEvent(evnt));
            }
Ejemplo n.º 2
0
 protected override bool OnLeaveNotifyEvent(EventCrossing evnt)
 {
     highlightAnnotation = null;
     widget.QueueDraw();
     return(base.OnLeaveNotifyEvent(evnt));
 }