From c8b3aed76e3d2eede717c7cde0f1d2dd86768411 Mon Sep 17 00:00:00 2001 From: cxl Date: Wed, 27 May 2015 07:41:17 +0000 Subject: [PATCH] .developing HiDPI git-svn-id: svn://ultimatepp.org/upp/trunk@8476 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/CtrlCore/DrawWin32.cpp | 2 +- uppsrc/CtrlLib/ChWin32.cpp | 2 ++ uppsrc/ide/idewin.cpp | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/uppsrc/CtrlCore/DrawWin32.cpp b/uppsrc/CtrlCore/DrawWin32.cpp index 2b362a591..b70d940f6 100644 --- a/uppsrc/CtrlCore/DrawWin32.cpp +++ b/uppsrc/CtrlCore/DrawWin32.cpp @@ -30,7 +30,7 @@ Size SystemDraw::GetPageSize() const Size SystemDraw::GetNativeDpi() const { - return Dots() ? nativeDpi : Size(96, 96); + return nativeDpi; } #ifndef PLATFORM_WINCE diff --git a/uppsrc/CtrlLib/ChWin32.cpp b/uppsrc/CtrlLib/ChWin32.cpp index 8220fe37a..d78196924 100644 --- a/uppsrc/CtrlLib/ChWin32.cpp +++ b/uppsrc/CtrlLib/ChWin32.cpp @@ -595,6 +595,8 @@ void ChSysInit() CtrlsImg::Reset(); ChReset(); XpClear(); + + GUI_HiDPI_Write(GetStdFontCy() > 22); GUI_GlobalStyle_Write(IsWinXP() && !ScreenInPaletteMode() && IsSysFlag(0x1022 /*SPI_GETFLATMENU*/) ? GUISTYLE_XP : GUISTYLE_CLASSIC); diff --git a/uppsrc/ide/idewin.cpp b/uppsrc/ide/idewin.cpp index 6d3c19164..e83881114 100644 --- a/uppsrc/ide/idewin.cpp +++ b/uppsrc/ide/idewin.cpp @@ -721,10 +721,11 @@ void AppMain___() #ifdef flagTEST_HIDPI Font fnt = GetStdFont(); SetStdFont(fnt.Height(2 * fnt.GetHeight())); + GUI_HiDPI_Write(1); + DDUMP(GUI_HiDPI()); #endif SetLanguage(LNG_ENGLISH); SetDefaultCharset(CHARSET_UTF8); - GUI_HiDPI_Write(1); const Vector& arg = CommandLine();