aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2012-05-08 22:10:50 +1000
committernyamatongwe <devnull@localhost>2012-05-08 22:10:50 +1000
commit487ca54326e6aa9fb016a21e625c609e45e2bb54 (patch)
treeb1ed1259b0a93e312d6142881496b1137a3d5c93
parente3ecdee5158583f43b6bb2cf2b461c81cb9608e3 (diff)
downloadscintilla-mirror-487ca54326e6aa9fb016a21e625c609e45e2bb54.tar.gz
For high DPI modes use explicit 96 DPI scaling for Direct2D to avoid double
scaling and mouse clicks selecting text further in buffer.
-rw-r--r--win32/ScintillaWin.cxx4
1 files 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);