From d4da3ef1bb8d681df4ffad93dad644898932a24d Mon Sep 17 00:00:00 2001 From: Martyn Gigg Date: Tue, 7 Mar 2017 13:26:34 +0000 Subject: [PATCH] Extract the manifest from main and add dpiAware=false setting Forcing the application to dpi unware status allows Windows to apply the window scaling set by the user in the control panel. Icons and bitmaps that were previously too small to be usable are now scaled suitably. Other platforms are unaffected by this change. Refs #19078 --- MantidPlot/CMakeLists.txt | 6 +++++- MantidPlot/MantidPlot.manifest | 35 ++++++++++++++++++++++++++++++++++ MantidPlot/src/main.cpp | 16 ---------------- 3 files changed, 40 insertions(+), 17 deletions(-) create mode 100644 MantidPlot/MantidPlot.manifest diff --git a/MantidPlot/CMakeLists.txt b/MantidPlot/CMakeLists.txt index a1d787611590..7f99f3cba60f 100644 --- a/MantidPlot/CMakeLists.txt +++ b/MantidPlot/CMakeLists.txt @@ -637,7 +637,11 @@ set ( MOCCED_FILES ${MOCCED_FILES} ${CMAKE_CURRENT_BINARY_DIR}/qtcolorpicker.moc set ( SRC_FILES ${QTIPLOT_SRCS} ${MANTID_SRCS} ${SIP_SRC} ) set ( INC_FILES ${QTIPLOT_HDRS} ${MANTID_HDRS} ) -set ( ALL_SRC ${SRC_FILES} ${MOCCED_FILES} ) +if ( WIN32 ) + set ( MANIFEST_FILES MantidPlot.manifest ) +endif () + +set ( ALL_SRC ${SRC_FILES} ${MOCCED_FILES} ${MANIFEST_FILES} ) # Use a precompiled header where they are supported enable_precompiled_headers( src/PrecompiledHeader.h ALL_SRC ) diff --git a/MantidPlot/MantidPlot.manifest b/MantidPlot/MantidPlot.manifest new file mode 100644 index 000000000000..c85468c22805 --- /dev/null +++ b/MantidPlot/MantidPlot.manifest @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + false + + + diff --git a/MantidPlot/src/main.cpp b/MantidPlot/src/main.cpp index 8fd15d51f13d..e368e51b409b 100644 --- a/MantidPlot/src/main.cpp +++ b/MantidPlot/src/main.cpp @@ -153,22 +153,6 @@ only one class per file, with the exception of the indentation depth for him/herself. */ -#if defined(_MSC_VER) -// MantidPlot embeds a Python interpreter which depends on MSVCRT90.dll. -// Extension modules -// can also depend on the same runtime but it exists in the SxS system folder. -// Even though -// Python27.dll loads the runtime correctly there is an issue that extension -// modules -// using ctypes.cdll.LoadLibrary don't consult the SxS registry and fail to load -// the correct -// runtime library. See for example zmq. -// For more information see https://bugs.python.org/issue24429 -#pragma comment( \ - linker, \ - "\"/manifestdependency:type='win32' name='Microsoft.VC90.CRT' version='9.0.21022.8' processorArchitecture='amd64' publicKeyToken='1fc8b3b9a1e18e3b'\"") -#endif - int main(int argc, char **argv) { // First, look for command-line arguments that we want to deal with before // launching anything