Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
authorMike Krüger <mkrueger@xamarin.com>2013-08-23 19:34:06 +0400
committerMike Krüger <mkrueger@xamarin.com>2013-08-23 19:34:06 +0400
commit4f96cacc9bc72a513669d7a0526c199ec151f0a9 (patch)
tree933ae11d1cf2c821b47f96bf1ac5f1ae8699533e /main/src
parenta36116edd7123d97ad739cac20283dd7b4a1d9fd (diff)
[TextEditor] Fixed drawing bug.
Diffstat (limited to 'main/src')
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextViewMargin.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextViewMargin.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextViewMargin.cs
index 9c20a79e7a..eabc9325c1 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextViewMargin.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextViewMargin.cs
@@ -1728,8 +1728,9 @@ namespace Mono.TextEditor
wrapper.Layout.FontDescription = textEditor.Options.Font;
int vy, vx;
wrapper.Layout.GetSize (out vx, out vy);
-
- var x = (position + vx / Pango.Scale.PangoScale) + layout.Width;
+ vx = (int)(vx / Pango.Scale.PangoScale);
+
+ var x = (position + vx) + layout.Width;
SetVisibleCaretPosition (x, y, x, y);
xPos = position + layout.Width;
@@ -1737,7 +1738,7 @@ namespace Mono.TextEditor
double startX;
double endX;
startX = xPos;
- endX = position + vx / Pango.Scale.PangoScale + layout.Width;
+ endX = position + vx + layout.Width;
DrawRectangleWithRuler (cr, xPos + textEditor.HAdjustment.Value - TextStartPosition, new Cairo.Rectangle (startX, y, endX - startX, _lineHeight), this.SelectionColor.Background, true);
}
@@ -1745,7 +1746,7 @@ namespace Mono.TextEditor
var virtualSpaceMod = selectionStart < caretOffset ? 0 : virtualSpace.Length;
if ((!textEditor.IsSomethingSelected || (selectionStart >= offset && selectionStart != selectionEnd)) && (HighlightCaretLine || textEditor.Options.HighlightCaretLine) && Caret.Line == lineNumber)
- DrawCaretLineMarker (cr, position, y, vx / Pango.Scale.PangoScale, _lineHeight);
+ DrawCaretLineMarker (cr, position, y, vx, _lineHeight);
if (DecorateLineBg != null)
DecorateLineBg (cr, wrapper, offset, length, xPos, y, selectionStart + virtualSpaceMod, selectionEnd + virtualSpace.Length);
@@ -2624,7 +2625,6 @@ namespace Mono.TextEditor
var lineArea = new Cairo.Rectangle (correctedXOffset, y, textEditor.Allocation.Width - correctedXOffset, _lineHeight);
int width, height;
double position = x - textEditor.HAdjustment.Value + TextStartPosition;
-
defaultBgColor = Document.ReadOnly ? ColorStyle.BackgroundReadOnly.Color : ColorStyle.PlainText.Background;
// Draw the default back color for the whole line. Colors other than the default