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
This commit is contained in:
@ -36,6 +36,20 @@ G_DEFINE_TYPE (GdkWin32Screen, gdk_win32_screen, GDK_TYPE_SCREEN)
|
|||||||
static void
|
static void
|
||||||
gdk_win32_screen_init (GdkWin32Screen *display)
|
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 *
|
static GdkDisplay *
|
||||||
|
|||||||
Reference in New Issue
Block a user