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

github.com/mono/xwt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLluis Sanchez <lluis@xamarin.com>2014-02-05 15:07:27 +0400
committerLluis Sanchez <lluis@xamarin.com>2014-02-05 15:08:02 +0400
commit5b8bf1b2ac12f1ecdd945c0708577dea72bad009 (patch)
treed069e25bfe70d4dd6c748964cd330ca8b5e459a5 /Xwt.Gtk
parent64143d1dc54d7a3b7b11959c69575b14d278905e (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-xXwt.Gtk/Xwt.GtkBackend/GtkEngine.cs5
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)