From f5cf3cb81d5fa306c96e71e9a3b0f5e21c53ebf7 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Mon, 29 Nov 2021 21:00:43 +0100 Subject: [PATCH] MSW specific: Hide "Use system menu for application" option in Preferences for system older then Windows 10 (related to the fix of #7355 - PrusaSlicer 2.4.0-beta-2+win64 will not start on Windows 7 64-bit ) + Updated URL_HASH SHA256 in wxWidgets.cmake in respect to the 51c824019e98fc97b0bcdd4d9f4ed4cb523a7cac in wxWidgets-v3.1.4-patched --- deps/wxWidgets/wxWidgets.cmake | 2 +- src/slic3r/GUI/Preferences.cpp | 20 ++++++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/deps/wxWidgets/wxWidgets.cmake b/deps/wxWidgets/wxWidgets.cmake index c993d89487..73d841014d 100644 --- a/deps/wxWidgets/wxWidgets.cmake +++ b/deps/wxWidgets/wxWidgets.cmake @@ -13,7 +13,7 @@ prusaslicer_add_cmake_project(wxWidgets # GIT_REPOSITORY "https://github.com/prusa3d/wxWidgets" # GIT_TAG tm_cross_compile #${_wx_git_tag} URL https://github.com/prusa3d/wxWidgets/archive/refs/heads/v3.1.4-patched.zip - URL_HASH SHA256=21ed12eb5c215b00999f0374af652be0a6f785df10d18d0dfec8d81ed4abaea3 + URL_HASH SHA256=ed36a2159c781cce07b06378664e683ebd8cb2f51914aba9acd3bfca3d63d7d3 DEPENDS ${PNG_PKG} ${ZLIB_PKG} ${EXPAT_PKG} dep_TIFF dep_JPEG CMAKE_ARGS -DwxBUILD_PRECOMP=ON diff --git a/src/slic3r/GUI/Preferences.cpp b/src/slic3r/GUI/Preferences.cpp index 4359d600b8..d6422bbadb 100644 --- a/src/slic3r/GUI/Preferences.cpp +++ b/src/slic3r/GUI/Preferences.cpp @@ -481,14 +481,18 @@ void PreferencesDialog::build(size_t selected_tab) option = Option(def, "dark_color_mode"); m_optgroup_dark_mode->append_single_option_line(option); - def.label = L("Use system menu for application"); - def.type = coBool; - def.tooltip = L("If enabled, application will use the standart Windows system menu,\n" - "but on some combination od display scales it can look ugly. " - "If disabled, old UI will be used."); - def.set_default_value(new ConfigOptionBool{ app_config->get("sys_menu_enabled") == "1" }); - option = Option(def, "sys_menu_enabled"); - m_optgroup_dark_mode->append_single_option_line(option); + if (wxPlatformInfo::Get().GetOSMajorVersion() >= 10) // Use system menu just for Window newer then Windows 10 + // Use menu with ownerdrawn items by default on systems older then Windows 10 + { + def.label = L("Use system menu for application"); + def.type = coBool; + def.tooltip = L("If enabled, application will use the standart Windows system menu,\n" + "but on some combination od display scales it can look ugly. " + "If disabled, old UI will be used."); + def.set_default_value(new ConfigOptionBool{ app_config->get("sys_menu_enabled") == "1" }); + option = Option(def, "sys_menu_enabled"); + m_optgroup_dark_mode->append_single_option_line(option); + } activate_options_tab(m_optgroup_dark_mode); }