diff options
author | Lluis Sanchez <lluis@xamarin.com> | 2014-02-05 15:07:27 +0400 |
---|---|---|
committer | Lluis Sanchez <lluis@xamarin.com> | 2014-02-05 15:08:02 +0400 |
commit | 5b8bf1b2ac12f1ecdd945c0708577dea72bad009 (patch) | |
tree | d069e25bfe70d4dd6c748964cd330ca8b5e459a5 /Xwt.Gtk | |
parent | 64143d1dc54d7a3b7b11959c69575b14d278905e (diff) |
Toolkit.WrapContext now requires a reference to a widget
This widget is used to determine the scale factor
Diffstat (limited to 'Xwt.Gtk')
-rwxr-xr-x | Xwt.Gtk/Xwt.GtkBackend/GtkEngine.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Xwt.Gtk/Xwt.GtkBackend/GtkEngine.cs b/Xwt.Gtk/Xwt.GtkBackend/GtkEngine.cs index b059b0a4..d46ad495 100755 --- a/Xwt.Gtk/Xwt.GtkBackend/GtkEngine.cs +++ b/Xwt.Gtk/Xwt.GtkBackend/GtkEngine.cs @@ -274,9 +274,10 @@ namespace Xwt.GtkBackend throw new NotSupportedException (); } - public override object GetBackendForContext (object nativeContext) + public override object GetBackendForContext (object nativeWidget, object nativeContext) { - return new CairoContextBackend (1) { Context = (Cairo.Context)nativeContext }; + Gtk.Widget w = (Gtk.Widget)nativeWidget; + return new CairoContextBackend (Util.GetScaleFactor (w)) { Context = (Cairo.Context)nativeContext }; } public override object GetNativeParentWindow (Widget w) |