diff options
author | Руслан Ижбулатов <lrn1986@gmail.com> | 2014-07-31 14:01:56 +0000 |
---|---|---|
committer | Руслан Ижбулатов <lrn1986@gmail.com> | 2014-07-31 14:01:56 +0000 |
commit | f38498ed841f6e63b1904e92be48c9f5f429bd31 (patch) | |
tree | 1920ef0cfb64a95f044bcdb51d31fa91947c0225 /gdk/win32/gdkscreen-win32.c | |
parent | d6e9997619fb6bfe082360f1702d6d29250dc3ce (diff) | |
download | gtk+-f38498ed841f6e63b1904e92be48c9f5f429bd31.tar.gz |
GDK W32: support font scaling
Respect system font scaling (Control Panel -> Display -> Font Size) and
convey that information to GDK (which then passes it to Pango).
https://bugzilla.gnome.org/show_bug.cgi?id=734038
Diffstat (limited to 'gdk/win32/gdkscreen-win32.c')
-rw-r--r-- | gdk/win32/gdkscreen-win32.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gdk/win32/gdkscreen-win32.c b/gdk/win32/gdkscreen-win32.c index 8cab47117d..f86d7ce0ab 100644 --- a/gdk/win32/gdkscreen-win32.c +++ b/gdk/win32/gdkscreen-win32.c @@ -36,6 +36,20 @@ G_DEFINE_TYPE (GdkWin32Screen, gdk_win32_screen, GDK_TYPE_SCREEN) static void gdk_win32_screen_init (GdkWin32Screen *display) { + GdkScreen *screen = GDK_SCREEN (display); + HDC screen_dc; + int logpixelsx = -1; + + screen_dc = GetDC (NULL); + + if (screen_dc) + { + logpixelsx = GetDeviceCaps(screen_dc, LOGPIXELSX); + ReleaseDC (NULL, screen_dc); + } + + if (logpixelsx > 0) + _gdk_screen_set_resolution (screen, logpixelsx); } static GdkDisplay * |