diff options
author | Mike Krüger <mkrueger@xamarin.com> | 2014-02-17 13:13:52 +0400 |
---|---|---|
committer | Mike Krüger <mkrueger@xamarin.com> | 2014-02-17 13:14:06 +0400 |
commit | 3c45f391196bdaac0df78168783b221e9666921c (patch) | |
tree | f0bd6901a0a10a431a53c63a58a7298207ecbbcc /main/src/addins/MonoDevelop.HexEditor | |
parent | 0be8c6d17410ba8e47be2ade18a0664dadcd4273 (diff) |
[HexEditor] Use xwt monospace font as fallback.
Diffstat (limited to 'main/src/addins/MonoDevelop.HexEditor')
-rw-r--r-- | main/src/addins/MonoDevelop.HexEditor/Mono.MHex/HexEditorOptions.cs | 7 | ||||
-rw-r--r-- | main/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor/HexEditorView.cs | 3 |
2 files changed, 5 insertions, 5 deletions
diff --git a/main/src/addins/MonoDevelop.HexEditor/Mono.MHex/HexEditorOptions.cs b/main/src/addins/MonoDevelop.HexEditor/Mono.MHex/HexEditorOptions.cs index b985a79ab7..ba172c5fb1 100644 --- a/main/src/addins/MonoDevelop.HexEditor/Mono.MHex/HexEditorOptions.cs +++ b/main/src/addins/MonoDevelop.HexEditor/Mono.MHex/HexEditorOptions.cs @@ -31,7 +31,6 @@ namespace Mono.MHex { class HexEditorOptions : IHexEditorOptions, IDisposable { - public const string DEFAULT_FONT = "Mono 10"; static HexEditorOptions options = new HexEditorOptions (); public static HexEditorOptions DefaultOptions { get { @@ -98,7 +97,7 @@ namespace Mono.MHex OnChanged (EventArgs.Empty); } } - string fontName = DEFAULT_FONT; + string fontName; public virtual string FontName { get { return fontName; @@ -106,7 +105,7 @@ namespace Mono.MHex set { if (fontName != value) { DisposeFont (); - fontName = !String.IsNullOrEmpty (value) ? value : DEFAULT_FONT; + fontName = value; OnChanged (EventArgs.Empty); } } @@ -134,7 +133,7 @@ namespace Mono.MHex Console.WriteLine ("Could not load font: {0}", FontName); } if (font == null || String.IsNullOrEmpty (font.Family)) - font = Font.FromName (DEFAULT_FONT); + font = Font.SystemMonospaceFont; if (font != null) font = font.WithSize (font.Size * Zoom); } diff --git a/main/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor/HexEditorView.cs b/main/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor/HexEditorView.cs index 7a09ea781b..4be398a0f6 100644 --- a/main/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor/HexEditorView.cs +++ b/main/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor/HexEditorView.cs @@ -31,6 +31,7 @@ using Mono.MHex; using Mono.MHex.Data; using MonoDevelop.Ide.Gui.Content; using Xwt; +using MonoDevelop.Ide.Fonts; namespace MonoDevelop.HexEditor { @@ -60,7 +61,7 @@ namespace MonoDevelop.HexEditor void SetOptions () { - hexEditor.Options.FontName = MonoDevelop.SourceEditor.DefaultSourceEditorOptions.Instance.FontName; + hexEditor.Options.FontName = FontService.GetUnderlyingFontName ("Editor"); hexEditor.PurgeLayoutCaches (); hexEditor.Repaint (); } |