|
|
|
@ -5,6 +5,7 @@
@@ -5,6 +5,7 @@
|
|
|
|
|
// <version>$Revision$</version>
|
|
|
|
|
// </file>
|
|
|
|
|
|
|
|
|
|
using System; |
|
|
|
|
using System.Drawing; |
|
|
|
|
|
|
|
|
|
namespace ICSharpCode.TextEditor.Util |
|
|
|
@ -27,17 +28,17 @@ namespace ICSharpCode.TextEditor.Util
@@ -27,17 +28,17 @@ namespace ICSharpCode.TextEditor.Util
|
|
|
|
|
brush = Brushes.Black; |
|
|
|
|
if (flipped) { |
|
|
|
|
base.Graphics.FillPolygon(brush, new PointF[] { |
|
|
|
|
new PointF(x, y + triHeight2 - triHeight4), |
|
|
|
|
new PointF(x + triWidth / 2, y + triHeight2 + triHeight4), |
|
|
|
|
new PointF(x + triWidth, y + triHeight2 - triHeight4), |
|
|
|
|
}); |
|
|
|
|
new PointF(x, y + triHeight2 - triHeight4), |
|
|
|
|
new PointF(x + triWidth / 2, y + triHeight2 + triHeight4), |
|
|
|
|
new PointF(x + triWidth, y + triHeight2 - triHeight4), |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
base.Graphics.FillPolygon(brush, new PointF[] { |
|
|
|
|
new PointF(x, y + triHeight2 + triHeight4), |
|
|
|
|
new PointF(x + triWidth / 2, y + triHeight2 - triHeight4), |
|
|
|
|
new PointF(x + triWidth, y + triHeight2 + triHeight4), |
|
|
|
|
}); |
|
|
|
|
new PointF(x, y + triHeight2 + triHeight4), |
|
|
|
|
new PointF(x + triWidth / 2, y + triHeight2 - triHeight4), |
|
|
|
|
new PointF(x + triWidth, y + triHeight2 + triHeight4), |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -49,13 +50,13 @@ namespace ICSharpCode.TextEditor.Util
@@ -49,13 +50,13 @@ namespace ICSharpCode.TextEditor.Util
|
|
|
|
|
if (tipText != null && tipText.Length > 0) { |
|
|
|
|
base.Draw(new PointF(location.X + triWidth + 4, location.Y)); |
|
|
|
|
DrawingRectangle1 = new Rectangle((int)location.X + 2, |
|
|
|
|
(int)location.Y + 2, |
|
|
|
|
(int)(triWidth), |
|
|
|
|
(int)(triHeight)); |
|
|
|
|
(int)location.Y + 2, |
|
|
|
|
(int)(triWidth), |
|
|
|
|
(int)(triHeight)); |
|
|
|
|
DrawingRectangle2 = new Rectangle((int)(location.X + base.AllocatedSize.Width - triWidth - 2), |
|
|
|
|
(int)location.Y + 2, |
|
|
|
|
(int)(triWidth), |
|
|
|
|
(int)(triHeight)); |
|
|
|
|
(int)location.Y + 2, |
|
|
|
|
(int)(triWidth), |
|
|
|
|
(int)(triHeight)); |
|
|
|
|
DrawTriangle(location.X + 2, location.Y + 2, false); |
|
|
|
|
DrawTriangle(location.X + base.AllocatedSize.Width - triWidth - 2, location.Y + 2, true); |
|
|
|
|
} |
|
|
|
@ -89,6 +90,8 @@ namespace ICSharpCode.TextEditor.Util
@@ -89,6 +90,8 @@ namespace ICSharpCode.TextEditor.Util
|
|
|
|
|
base(graphics) |
|
|
|
|
{ |
|
|
|
|
tipFont = font; tipText = text; |
|
|
|
|
if (text != null && text.Length > short.MaxValue) |
|
|
|
|
throw new ArgumentException("TipText: text too long (max. is " + short.MaxValue + " characters)", "text"); |
|
|
|
|
|
|
|
|
|
Color = SystemColors.InfoText; |
|
|
|
|
HorizontalAlignment = StringAlignment.Near; |
|
|
|
|