diff options
Diffstat (limited to 'main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.PreviewVisualizers')
2 files changed, 9 insertions, 14 deletions
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.PreviewVisualizers/GenericPreviewVisualizer.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.PreviewVisualizers/GenericPreviewVisualizer.cs index 604979ad5e..00fa8d0e8b 100644 --- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.PreviewVisualizers/GenericPreviewVisualizer.cs +++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.PreviewVisualizers/GenericPreviewVisualizer.cs @@ -27,6 +27,7 @@ using System; using MonoDevelop.Components; using Mono.Debugging.Client; using Gtk; +using MonoDevelop.Ide.Fonts; namespace MonoDevelop.Debugger.PreviewVisualizers { @@ -42,23 +43,16 @@ namespace MonoDevelop.Debugger.PreviewVisualizers public override Control GetVisualizerWidget (ObjectValue val) { string value = val.Value; - Gdk.Color col = new Gdk.Color (85, 85, 85); + Gdk.Color col = Styles.PreviewVisualizerTextColor.ToGdkColor (); if (!val.IsNull && (val.TypeName == "string" || val.TypeName == "char[]")) value = '"' + GetString (val) + '"'; if (DebuggingService.HasInlineVisualizer (val)) value = DebuggingService.GetInlineVisualizer (val).InlineVisualize (val); - var label = new Gtk.Label (value); - var font = label.Style.FontDescription.Copy (); - - if (font.SizeIsAbsolute) { - font.AbsoluteSize = font.Size - 1; - } else { - font.Size -= (int)(Pango.Scale.PangoScale); - } - - label.ModifyFont (font); + var label = new Gtk.Label (); + label.Text = value; + label.ModifyFont (FontService.SansFont.CopyModified (Ide.Gui.Styles.FontScale11)); label.ModifyFg (StateType.Normal, col); label.SetPadding (4, 4); diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.PreviewVisualizers/PreviewVisualizerWindow.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.PreviewVisualizers/PreviewVisualizerWindow.cs index a3bd79b733..5a2bb447e7 100644 --- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.PreviewVisualizers/PreviewVisualizerWindow.cs +++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.PreviewVisualizers/PreviewVisualizerWindow.cs @@ -31,6 +31,7 @@ using Gdk; using Gtk; using MonoDevelop.Ide; using MonoDevelop.Debugger.PreviewVisualizers; +using MonoDevelop.Ide.Fonts; namespace MonoDevelop.Debugger { @@ -44,7 +45,7 @@ namespace MonoDevelop.Debugger this.Modal = true; TransientFor = (Gtk.Window) invokingWidget.Toplevel; - Theme.SetFlatColor (new Cairo.Color (245 / 256.0, 245 / 256.0, 245 / 256.0)); + Theme.SetBackgroundColor (Styles.PreviewVisualizerBackgroundColor.ToCairoColor ()); Theme.Padding = 3; ShowArrow = true; var mainBox = new VBox (); @@ -64,8 +65,8 @@ namespace MonoDevelop.Debugger headerTable.Attach (hb, 0, 1, 0, 1); var headerTitle = new Label (); - headerTitle.ModifyFg (StateType.Normal, new Color (36, 36, 36)); - var font = headerTitle.Style.FontDescription.Copy (); + headerTitle.ModifyFg (StateType.Normal, Styles.PreviewVisualizerHeaderTextColor.ToGdkColor ()); + var font = FontService.SansFont.CopyModified (Ide.Gui.Styles.FontScale12); font.Weight = Pango.Weight.Bold; headerTitle.ModifyFont (font); headerTitle.Text = val.TypeName; |