From 40e1626cac33af0369375896dee2a7e61213eb89 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 8 May 2012 22:10:50 +1000 Subject: For high DPI modes use explicit 96 DPI scaling for Direct2D to avoid double scaling and mouse clicks selecting text further in buffer. --- win32/ScintillaWin.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index f0f5ee4c2..c2727607b 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -423,7 +423,7 @@ void ScintillaWin::EnsureRenderTarget() { // Create a Direct2D render target. #if 1 pD2DFactory->CreateHwndRenderTarget( - D2D1::RenderTargetProperties(), + D2D1::RenderTargetProperties(D2D1_RENDER_TARGET_TYPE_DEFAULT, D2D1::PixelFormat(), 96.0, 96.0), D2D1::HwndRenderTargetProperties(hw, size), &pRenderTarget); #else @@ -2810,7 +2810,7 @@ sptr_t PASCAL ScintillaWin::CTWndProc( } else { #if defined(USE_D2D) pD2DFactory->CreateHwndRenderTarget( - D2D1::RenderTargetProperties(), + D2D1::RenderTargetProperties(D2D1_RENDER_TARGET_TYPE_DEFAULT, D2D1::PixelFormat(), 96.0, 96.0), D2D1::HwndRenderTargetProperties(hWnd, D2D1::SizeU(rc.right - rc.left, rc.bottom - rc.top)), &pCTRenderTarget); surfaceWindow->Init(pCTRenderTarget, hWnd); -- cgit v1.2.3