~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to src/core/MonoDevelop.Ide/MonoDevelop.Components.PropertyGrid/PropertyEditorCell.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
131
131
                {
132
132
                        layout.GetPixelSize (out width, out height);
133
133
                }
134
 
                
135
 
                public virtual void Render (Drawable window, Gdk.Rectangle bounds, StateType state)
 
134
 
 
135
                public virtual void Render (Gdk.Drawable window, Cairo.Context ctx, Gdk.Rectangle bounds, StateType state)
136
136
                {
137
137
                        int w, h;
138
138
                        layout.GetPixelSize (out w, out h);
139
139
                        int dy = (bounds.Height - h) / 2;
140
 
                        window.DrawLayout (container.Style.TextGC (state), bounds.X, dy + bounds.Y, layout);
 
140
 
 
141
                        ctx.Save ();
 
142
                        ctx.Color = container.Style.Text (state).ToCairoColor();
 
143
                        ctx.MoveTo (bounds.X, dy + bounds.Y);
 
144
                        Pango.CairoHelper.ShowLayout (ctx, layout);
 
145
                        ctx.Restore ();
141
146
                }
142
147
                
143
148
                protected virtual IPropertyEditor CreateEditor (Gdk.Rectangle cell_area, StateType state)
344
349
                        
345
350
                        Gdk.Rectangle rect = Allocation;
346
351
                        rect.Inflate (-3, 0);// Add some margin
347
 
                        
348
 
                        cell.Render (this.GdkWindow, rect, StateType.Normal);
 
352
 
 
353
                        using (Cairo.Context ctx = Gdk.CairoHelper.Create (this.GdkWindow)) {
 
354
                                cell.Render (this.GdkWindow, ctx, rect, StateType.Normal);
 
355
                        }
349
356
                        return res;
350
357
                }
351
358
        }