diff options
author | David Karlaš <david.karlas@xamarin.com> | 2014-12-08 17:25:54 +0300 |
---|---|---|
committer | David Karlaš <david.karlas@xamarin.com> | 2014-12-08 17:25:54 +0300 |
commit | 9d8a5824583d0c02a4c44d8ce1687dc1aceb3847 (patch) | |
tree | 62cc83cbd567efa9b7561411234129a99fde85cc /main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.PreviewVisualizers | |
parent | b53ff7948b33f649c495cbf6c07f3bf654667164 (diff) |
[DebuggerVisualizers] Fixed few UI problems on Windows when displaying PreviewWindow
Diffstat (limited to 'main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.PreviewVisualizers')
2 files changed, 6 insertions, 9 deletions
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 652946bc4e..0f7b8f462a 100644 --- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.PreviewVisualizers/PreviewVisualizerWindow.cs +++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.PreviewVisualizers/PreviewVisualizerWindow.cs @@ -36,13 +36,12 @@ namespace MonoDevelop.Debugger { public class PreviewVisualizerWindow : PopoverWindow { - public PreviewVisualizerWindow () + public PreviewVisualizerWindow (ObjectValue val, Gtk.Widget invokingWidget) : base (Gtk.WindowType.Toplevel) { - TransientFor = IdeApp.Workbench.RootWindow; - } + this.TypeHint = WindowTypeHint.PopupMenu; + this.Decorated = false; + TransientFor = (Gtk.Window) invokingWidget.Toplevel; - public void Show (ObjectValue val, Gtk.Widget invokingWidget, Rectangle previewButtonArea) - { Theme.SetFlatColor (new Cairo.Color (245 / 256.0, 245 / 256.0, 245 / 256.0)); Theme.Padding = 0; ShowArrow = true; @@ -65,7 +64,6 @@ namespace MonoDevelop.Debugger var headerTitle = new Label (); headerTitle.ModifyFg (StateType.Normal, new Color (64, 64, 64)); var font = headerTitle.Style.FontDescription.Copy (); - font.Size = (int)(12 * Pango.Scale.PangoScale); font.Weight = Pango.Weight.Bold; headerTitle.ModifyFont (font); headerTitle.Text = val.TypeName.Split ('.').LastOrDefault (); @@ -108,7 +106,6 @@ namespace MonoDevelop.Debugger alignment.Add (widget); mainBox.PackStart (alignment); ContentBox.Add (mainBox); - ShowPopup (invokingWidget, previewButtonArea, PopupPosition.Left); } } } diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.PreviewVisualizers/PreviewWindowManager.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.PreviewVisualizers/PreviewWindowManager.cs index 3c1d15cf3a..f22e03dca9 100644 --- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.PreviewVisualizers/PreviewWindowManager.cs +++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.PreviewVisualizers/PreviewWindowManager.cs @@ -44,8 +44,8 @@ namespace MonoDevelop.Debugger public static void Show (ObjectValue val, Control widget, Gdk.Rectangle previewButtonArea) { DestroyWindow (); - wnd = new PreviewVisualizerWindow (); - wnd.Show (val, widget, previewButtonArea); + wnd = new PreviewVisualizerWindow (val, widget); + wnd.ShowPopup (widget, previewButtonArea, PopupPosition.Left); wnd.Destroyed += HandleDestroyed; OnWindowShown (EventArgs.Empty); } |