diff options
author | Mike Krüger <mkrueger@xamarin.com> | 2011-10-25 11:26:23 +0400 |
---|---|---|
committer | Mike Krüger <mkrueger@xamarin.com> | 2011-10-25 11:26:23 +0400 |
commit | bd5c13864214eb506bcdf35b2c974deb3f057336 (patch) | |
tree | 96e7f5528ac8ba6451a61b651d3544c932dac1a6 /main | |
parent | 832e835d92230d812f467cd3863751c032fd9196 (diff) |
Fixed 'Bug 1296 - Right padding for line numbers in text view to small
when disabling code folding'.
Diffstat (limited to 'main')
-rw-r--r-- | main/src/core/Mono.Texteditor/Mono.TextEditor/GutterMargin.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor/GutterMargin.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor/GutterMargin.cs index 46c2e20296..a2c2ea943b 100644 --- a/main/src/core/Mono.Texteditor/Mono.TextEditor/GutterMargin.cs +++ b/main/src/core/Mono.Texteditor/Mono.TextEditor/GutterMargin.cs @@ -70,6 +70,8 @@ namespace Mono.TextEditor int height; layout.GetPixelSize (out this.width, out height); this.width += 4; + if (!editor.Options.ShowFoldMargin) + this.width += 2; } } @@ -198,7 +200,7 @@ namespace Mono.TextEditor layout.Alignment = Pango.Alignment.Right; layout.SetText (line.ToString ()); cr.Save (); - cr.Translate (x + (int)Width, y); + cr.Translate (x + (int)Width + (editor.Options.ShowFoldMargin ? 0 : -2), y); cr.Color = editor.Caret.Line == line ? lineNumberHighlightGC : lineNumberGC; cr.ShowLayout (layout); cr.Restore (); |