Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
Yuhang Zhao 2022-03-15 18:04:05 +08:00
parent 6bbbc0a145
commit 7694a10e87
2 changed files with 27 additions and 10 deletions

View File

@ -9,9 +9,11 @@ if(NOT DEFINED CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
if(NOT (CMAKE_BUILD_TYPE STREQUAL "Debug") AND NOT DEFINED CMAKE_INTERPROCEDURAL_OPTIMIZATION)
if(NOT (CMAKE_BUILD_TYPE STREQUAL "Debug"))
if(NOT DEFINED CMAKE_INTERPROCEDURAL_OPTIMIZATION)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
endif()
endif()
if(NOT DEFINED CMAKE_DEBUG_POSTFIX)
if(WIN32)
@ -21,6 +23,23 @@ if(NOT DEFINED CMAKE_DEBUG_POSTFIX)
endif()
endif()
if(NOT DEFINED CMAKE_RUNTIME_OUTPUT_DIRECTORY)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
endif()
if(NOT DEFINED CMAKE_LIBRARY_OUTPUT_DIRECTORY)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
endif()
if(NOT DEFINED CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
endif()
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_C_VISIBILITY_PRESET hidden)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_VISIBILITY_INLINES_HIDDEN ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

View File

@ -874,15 +874,13 @@ void Utilities::startSystemResize(QWindow *window, const Qt::Edges edges)
bool Utilities::isWindowFrameBorderVisible()
{
static const bool result = []() -> bool {
// If we preserve the window frame border on systems before Windows 10,
// the window will look rather ugly and I guess no one would like to see
// such weired windows. If you really want to know what the window look
// like in such situations, just comment out the following IF statement
// and run your application on Windows 7/8/8.1.
if (!isWin10OrGreater()) {
return false;
if (qEnvironmentVariableIntValue("FRAMELESSHELPER_FORCE_SHOW_FRAME_BORDER") != 0) {
return true;
}
return !qEnvironmentVariableIsSet("FRAMELESSHELPER_HIDE_FRAME_BORDER");
// If we preserve the window frame border on systems prior to Windows 10,
// the window will look rather ugly and I guess no one would like to see
// such weired windows.
return (isWin10OrGreater() && !qEnvironmentVariableIsSet("FRAMELESSHELPER_HIDE_FRAME_BORDER"));
}();
return result;
}