Browse Source

SD-1847 - Search Results should use same font as the text editor (http://bugtracker.sharpdevelop.net/Issue/Comment.aspx?ID=1847&PROJID=4)

4.1
Siegfried Pammer 15 years ago
parent
commit
d5f606eda2
  1. 6
      src/AddIns/BackendBindings/Scripting/Test/Utils/MockTextEditorOptions.cs
  2. 6
      src/AddIns/BackendBindings/WixBinding/Test/Utils/MockTextEditorOptions.cs
  3. 6
      src/AddIns/DisplayBindings/XmlEditor/Test/Utils/MockTextEditorOptions.cs
  4. 4
      src/AddIns/Misc/SearchAndReplace/Project/Gui/SearchResultNode.cs
  5. 6
      src/Main/Base/Project/Src/Editor/AvalonEdit/AvalonEditTextEditorAdapter.cs
  6. 6
      src/Main/Base/Project/Src/Editor/IEditorControlService.cs
  7. 5
      src/Main/Base/Project/Src/Editor/ITextEditor.cs

6
src/AddIns/BackendBindings/Scripting/Test/Utils/MockTextEditorOptions.cs

@ -30,5 +30,11 @@ namespace ICSharpCode.Scripting.Tests.Utils @@ -30,5 +30,11 @@ namespace ICSharpCode.Scripting.Tests.Utils
throw new NotImplementedException();
}
}
public string FontFamily {
get {
throw new NotImplementedException();
}
}
}
}

6
src/AddIns/BackendBindings/WixBinding/Test/Utils/MockTextEditorOptions.cs

@ -50,5 +50,11 @@ namespace WixBinding.Tests.Utils @@ -50,5 +50,11 @@ namespace WixBinding.Tests.Utils
}
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged { add { } remove { } }
public string FontFamily {
get {
throw new NotImplementedException();
}
}
}
}

6
src/AddIns/DisplayBindings/XmlEditor/Test/Utils/MockTextEditorOptions.cs

@ -46,5 +46,11 @@ namespace XmlEditor.Tests.Utils @@ -46,5 +46,11 @@ namespace XmlEditor.Tests.Utils
throw new NotImplementedException();
}
}
public string FontFamily {
get {
throw new NotImplementedException();
}
}
}
}

4
src/AddIns/Misc/SearchAndReplace/Project/Gui/SearchResultNode.cs

@ -21,8 +21,6 @@ namespace SearchAndReplace @@ -21,8 +21,6 @@ namespace SearchAndReplace
/// </summary>
sealed class SearchResultNode : SearchNode
{
static readonly FontFamily resultLineFamily = new FontFamily("Consolas, Courier New");
SearchResultMatch result;
PermanentAnchor anchor;
HighlightedInlineBuilder inlineBuilder;
@ -41,7 +39,7 @@ namespace SearchAndReplace @@ -41,7 +39,7 @@ namespace SearchAndReplace
if (lineNumber >= 1 && lineNumber <= document.TotalNumberOfLines) {
IDocumentLine matchedLine = document.GetLine(lineNumber);
inlineBuilder = new HighlightedInlineBuilder(matchedLine.Text);
inlineBuilder.SetFontFamily(0, inlineBuilder.Text.Length, resultLineFamily);
inlineBuilder.SetFontFamily(0, inlineBuilder.Text.Length, new FontFamily(EditorControlService.GlobalOptions.FontFamily));
IHighlighter highlighter = document.GetService(typeof(IHighlighter)) as IHighlighter;
if (highlighter != null) {

6
src/Main/Base/Project/Src/Editor/AvalonEdit/AvalonEditTextEditorAdapter.cs

@ -168,6 +168,12 @@ namespace ICSharpCode.SharpDevelop.Editor.AvalonEdit @@ -168,6 +168,12 @@ namespace ICSharpCode.SharpDevelop.Editor.AvalonEdit
add { avalonEditOptions.PropertyChanged += value; }
remove { avalonEditOptions.PropertyChanged -= value; }
}
public string FontFamily {
get {
return "Consolas";
}
}
}
public virtual ICSharpCode.Core.FileName FileName {

6
src/Main/Base/Project/Src/Editor/IEditorControlService.cs

@ -85,6 +85,12 @@ namespace ICSharpCode.SharpDevelop.Editor @@ -85,6 +85,12 @@ namespace ICSharpCode.SharpDevelop.Editor
public bool UnderlineErrors {
get { return true; }
}
public string FontFamily {
get {
return "Consolas";
}
}
}
}
}

5
src/Main/Base/Project/Src/Editor/ITextEditor.cs

@ -153,6 +153,11 @@ namespace ICSharpCode.SharpDevelop.Editor @@ -153,6 +153,11 @@ namespace ICSharpCode.SharpDevelop.Editor
/// Gets whether errors should be underlined.
/// </summary>
bool UnderlineErrors { get; }
/// <summary>
/// Gets the name of the currently used font.
/// </summary>
string FontFamily { get; }
}
public interface ITextEditorCaret

Loading…
Cancel
Save