Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2013-04-08 13:30:30 +0400
committerMichael Hutchinson <mhutch@xamarin.com>2013-04-23 08:03:32 +0400
commit633e0786701ce8cc18295c869f1b24a8f387a835 (patch)
treeb10856cd45bafe5239ca7bfc1b94c7ec0eb2f692 /main/src/core/MonoDevelop.Ide/MonoDevelop.Components.PropertyGrid.Editors
parente04360e821418b1dd61ea6ec791ed9a13142bb91 (diff)
[Ide] Use the same Cairo context when rendering propertygrid cells
Instead of window.DrawLayout(), use the Cairo context to draw in Pango.CairoHelper.ShowLayout().
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Components.PropertyGrid.Editors')
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components.PropertyGrid.Editors/BooleanEditorCell.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components.PropertyGrid.Editors/ColorEditorCell.cs4
2 files changed, 3 insertions, 3 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.PropertyGrid.Editors/BooleanEditorCell.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.PropertyGrid.Editors/BooleanEditorCell.cs
index 747735037d..30ff63b038 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.PropertyGrid.Editors/BooleanEditorCell.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.PropertyGrid.Editors/BooleanEditorCell.cs
@@ -50,7 +50,7 @@ namespace MonoDevelop.Components.PropertyGrid.PropertyEditors
height = 20;
}
- public override void Render (Gdk.Drawable window, Gdk.Rectangle bounds, Gtk.StateType state)
+ public override void Render (Gdk.Drawable window, Cairo.Context ctx, Gdk.Rectangle bounds, Gtk.StateType state)
{
Gtk.ShadowType sh = (bool) Value ? Gtk.ShadowType.In : Gtk.ShadowType.Out;
int s = indicatorSize - 1;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.PropertyGrid.Editors/ColorEditorCell.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.PropertyGrid.Editors/ColorEditorCell.cs
index af94facd33..f5242c009c 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.PropertyGrid.Editors/ColorEditorCell.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.PropertyGrid.Editors/ColorEditorCell.cs
@@ -57,7 +57,7 @@ namespace MonoDevelop.Components.PropertyGrid.PropertyEditors
return String.Format("#{0:x2}{1:x2}{2:x2}", color.R, color.G, color.B);
}
- public override void Render (Gdk.Drawable window, Gdk.Rectangle bounds, Gtk.StateType state)
+ public override void Render (Gdk.Drawable window, Cairo.Context ctx, Gdk.Rectangle bounds, Gtk.StateType state)
{
Gdk.GC gc = new Gdk.GC (window);
gc.RgbFgColor = GetColor ();
@@ -66,7 +66,7 @@ namespace MonoDevelop.Components.PropertyGrid.PropertyEditors
window.DrawRectangle (Container.Style.BlackGC, false, bounds.X, bounds.Y + yd, ColorBoxSize - 1, ColorBoxSize - 1);
bounds.X += ColorBoxSize + ColorBoxSpacing;
bounds.Width -= ColorBoxSize + ColorBoxSpacing;
- base.Render (window, bounds, state);
+ base.Render (window, ctx, bounds, state);
}
private Gdk.Color GetColor ()