From 465a27ccd94ed9918714f8ae3b9e40fe9ed10ba4 Mon Sep 17 00:00:00 2001 From: ALTaleX <2368730049@qq.com> Date: Tue, 6 Feb 2024 03:40:10 +0800 Subject: [PATCH 1/2] Improve translations. --- Languagefiles/en-US.xml | 55 ++++++++++++++++++++++++----------------- Languagefiles/zh-CN.xml | 19 +++++++++++--- Languagefiles/zh-SG.xml | 19 +++++++++++--- 3 files changed, 63 insertions(+), 30 deletions(-) diff --git a/Languagefiles/en-US.xml b/Languagefiles/en-US.xml index bf0e48e..500e316 100644 --- a/Languagefiles/en-US.xml +++ b/Languagefiles/en-US.xml @@ -3,14 +3,15 @@ MiaoUI library Initialization failed! error code: Failed to create window context! Failed to initialize window! - Note that due to DWM Authorization Isolation restrictions, the application must be placed in a non-user directory, and the path cannot be in "{path}" or its subdirectories! Please change the directory. - Loading symbols file failed! The program could not load the dll, please download the symbols again! (Symbols may also need to be re-downloaded after a system update) + Note that due to DWM is running in a sandbox, this application must be placed in a non-user directory, and the path cannot be in "{path}" or its sub directories! Please place it in another directory. + Loading symbol files failed! The program could not load the dll, please download the symbols again! (Symbols may also need to be re-downloaded after a system update) Select color: New color: Cancel Confirm Opacity: General + Advanced Symbol Config About @@ -19,38 +20,48 @@ Installed Install Uninstall - Installation successful! - The installation was successful! But you haven't downloaded a valid symbol file yet, download it from the "Symbols" page to make it work! - Installation failed! Error message: - Uninstalled successfully. - Uninstallation failed! Error message: + Install successfully! + Install successfully! But you haven't downloaded a valid symbol file yet, download it from the "Symbols" page to make DWMBlurGlass work! + Install failed! Error message: + Uninstall successfully. + Uninstall failed! Error message: Failed to load component! Error message: - Save Config + Save Effect Settings - Blur radius: - Override DWMAPI mica effect (win11) - Extend effects to borders (win10) - Enable Aero reflection effect (win10) - Reduce title bar button height (win7 style) - Title bar blend color (Active): - Title bar blend color (Inactive): + Blur radius (global): + Override DWMAPI effect (win11) + Effects extend to borders (win10) + Enable Aero reflection effect + (Legacy blur method for win10 only) + Decrease titlebar button height (win7 style) + Light Mode colors + Dark Mode Colors + Titlebar blend color (active): + Titlebar blend color (inactive): Active text color: Inactive text color: Preview Example window title (active) - Configuration file - Symbol file: + Blur Method: + [Recommended] Custom blur implementation written by CVisual (DWM)\nand Windows.UI.Composition (dcomp) to achieve custom backdrop effects, \nyou can customize most of the parameters, not only you can get the highest \nefficiency, but also the best appearance and better stability. However, the \ncompatibility is not that good. \n(it may be broken after a major Windows update, then you have to wait for \nthe next rlease). + [Not Recommended] Use DWM internal blur implementation but not deleted \nAccentBlurBehind class to apply blur effect, you can customize some of the \nparameters, but it is inefficient and less stable. It can work normally on most \nof the systems. \n(generally, a system update will not break it). + Use documented DWMAPI to apply limited SystemBackdrop effect, such as \nAcrylic, Mica effect, you cannot customize these parameters at all, but it has \nhigh efficiency, better stability. However, it may break the appearance of \nsome programs, and it is only available above Windows 11 22H2(+). + Effect Type: + Blur radius (titlebar only): + Luminosity Opacity: + Symbol files: Download - Symbol files (pdb) are files that record debugging information about a program. Since systems vary from version to version, you will need to download the symbol files from a Microsoft server. If you update your system, you may need to download the new file again. + Symbol files (pdb) are files that record debugging information about a\nprogram. Since systems vary from version to version, you need to\ndownload symbol files from the Microsoft server. If you update your\nsystem, you may need to download the symbol files again. Invalid Valid Downloading... - Download failed! Unable to download file from "msdl.microsoft.com". - Symbol file is invalid! Please go to the "Symbols" page of the DWMBlurGlass program to download a new symbol file! + Download failed! Unable to download symbol files from "msdl.microsoft.com". + Symbol files are invalid! Please go to the "Symbols" page of the DWMBlurGlass program to download new symbol files! + Configuration file Import Export - Restore defaults - Importing a configuration file will overwrite your existing configuration, continue? + Restore to default settings + Importing a configuration file will overwrite your existing configuration, continue anyway? Are you sure you want to restore the default configuration? This program is based on the LGPLv3 agreement free open source software: Current language: diff --git a/Languagefiles/zh-CN.xml b/Languagefiles/zh-CN.xml index f31957f..4bcef9b 100644 --- a/Languagefiles/zh-CN.xml +++ b/Languagefiles/zh-CN.xml @@ -11,6 +11,7 @@ 确认 不透明度: 通用设置 + 高级设置 符号文件 配置文件 关于 @@ -27,26 +28,36 @@ 加载组件失败! 错误信息: 保存配置 效果设置 - 模糊半径: + 模糊半径(全局): 覆盖使用DWMAPI设置的云母效果(win11) 扩展效果到边框 (win10) - 启用Aero反光效果 (win10) + 启用Aero反射效果 + (使用OldBlur仅限win10有效) 减少标题栏按钮高度 (win7样式) + 浅色模式颜色 + 深色模式颜色 标题栏混合颜色 (活动状态): 标题栏混合颜色 (非活动状态): 活动状态文本颜色: 非活动状态文本颜色: 预览 示例窗口标题(活动状态) - 配置文件 + 模糊方法: + [推荐] 使用本程序编写的模糊类 利用CVisual(DWM)和IComposition(dcomp)\n实现自定义背景效果,可以自定义绝大部分参数,效率最高,效果最好,稳定性较好,\n但系统适配范围一般(系统如果大更新可能会失效 需要等待更新) + [不推荐] 使用DWM内部未公开但未删除的AccentBlurBehind类实现模糊效果,\n可以自定义一小部分参数,效率较低,稳定性较差,系统适配范围较好\n(一般系统更新不会失效) + 使用公开的DWMAPI设置SystemBackdrop效果,可选预设的Acrylic、Mica效果,\n无法自定义参数,效率高,稳定性较好,但可能破坏部分程序的渲染,\n系统适配范围仅限Windows 11 22H2(+) + 效果类型: + 模糊半径(仅标题栏): + 材质亮度不透明度: 符号文件: 下载 - 符号文件(pdb)是记录程序调试信息的一种文件,由于各版本系统各不相同所以需要从微软服务器下载符号文件。如果您更新系统 可能需要重新下载新的文件。 + 符号文件(pdb)是记录程序调试信息的一种文件,由于各版本系统各不相同所以\n需要从微软服务器下载符号文件。如果您更新系统 可能需要重新下载新的文件。 无效 有效 下载中... 下载失败! 无法从"msdl.microsoft.com"下载文件 符号文件无效! 请转到DWMBlurGlass"符号文件"页面下载新的符号文件 + 配置文件 导入 导出 还原默认 diff --git a/Languagefiles/zh-SG.xml b/Languagefiles/zh-SG.xml index da4e2ef..1bb5424 100644 --- a/Languagefiles/zh-SG.xml +++ b/Languagefiles/zh-SG.xml @@ -11,6 +11,7 @@ 确认 不透明度: 通用设置 + 高级设置 符号文件 配置文件 关于 @@ -27,26 +28,36 @@ 加载组件失败! 错误信息: 保存配置 效果设置 - 模糊半径: + 模糊半径(全局): 覆盖使用DWMAPI设置的云母效果(win11) 扩展效果到边框 (win10) - 启用Aero反光效果 (win10) + 启用Aero反射效果 + (使用OldBlur仅限win10有效) 减少标题栏按钮高度 (win7样式) + 浅色模式颜色 + 深色模式颜色 标题栏混合颜色 (活动状态): 标题栏混合颜色 (非活动状态): 活动状态文本颜色: 非活动状态文本颜色: 预览 示例窗口标题(活动状态) - 配置文件 + 模糊方法: + [推荐] 使用本程序编写的模糊类 利用CVisual(DWM)和IComposition(dcomp)\n实现自定义背景效果,可以自定义绝大部分参数,效率最高,效果最好,稳定性较好,\n但系统适配范围一般(系统如果大更新可能会失效 需要等待更新) + [不推荐] 使用DWM内部未公开但未删除的AccentBlurBehind类实现模糊效果,\n可以自定义一小部分参数,效率较低,稳定性较差,系统适配范围较好\n(一般系统更新不会失效) + 使用公开的DWMAPI设置SystemBackdrop效果,可选预设的Acrylic、Mica效果,\n无法自定义参数,效率高,稳定性较好,但可能破坏部分程序的渲染,\n系统适配范围仅限Windows 11 22H2(+) + 效果类型: + 模糊半径(仅标题栏): + 材质亮度不透明度: 符号文件: 下载 - 符号文件(pdb)是记录程序调试信息的一种文件,由于各版本系统各不相同所以需要从微软服务器下载符号文件。如果您更新系统 可能需要重新下载新的文件。 + 符号文件(pdb)是记录程序调试信息的一种文件,由于各版本系统各不相同所以\n需要从微软服务器下载符号文件。如果您更新系统 可能需要重新下载新的文件。 无效 有效 下载中... 下载失败! 无法从"msdl.microsoft.com"下载文件 符号文件无效! 请转到DWMBlurGlass"符号文件"页面下载新的符号文件 + 配置文件 导入 导出 还原默认 From 5ed3627365852ca24b5c41fa66f8ac581ecd8729 Mon Sep 17 00:00:00 2001 From: ALTaleX <2368730049@qq.com> Date: Tue, 6 Feb 2024 04:09:05 +0800 Subject: [PATCH 2/2] fix the parameter of visual tree clone operation fix crash in windows 11 build 22000 caused by wrong offset --- DWMBlurGlassExt/Section/CustomBackdropEffect.cpp | 2 +- DWMBlurGlassExt/Section/CustomButton.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/DWMBlurGlassExt/Section/CustomBackdropEffect.cpp b/DWMBlurGlassExt/Section/CustomBackdropEffect.cpp index a53b3c4..2d87ff0 100644 --- a/DWMBlurGlassExt/Section/CustomBackdropEffect.cpp +++ b/DWMBlurGlassExt/Section/CustomBackdropEffect.cpp @@ -116,7 +116,7 @@ namespace MDWMBlurGlassExt::CustomBackdrop backdrop->GetVisual()->AllowVisualTreeClone(cloneAllowed); if (SUCCEEDED(hr)) { - auto clonedBackdrop{ std::make_shared(g_configData.effectType, true) }; + auto clonedBackdrop{ std::make_shared(g_configData.effectType, g_configData.reflection) }; backdrop->InitializeVisualTreeClone(clonedBackdrop.get()); g_backdropManager.CreateWithGivenBackdrop(topLevelWindow, clonedBackdrop); } diff --git a/DWMBlurGlassExt/Section/CustomButton.cpp b/DWMBlurGlassExt/Section/CustomButton.cpp index 3c16698..1e5d269 100644 --- a/DWMBlurGlassExt/Section/CustomButton.cpp +++ b/DWMBlurGlassExt/Section/CustomButton.cpp @@ -80,6 +80,8 @@ namespace MDWMBlurGlassExt::CustomButton CButton** button; if (os::buildNumber < 22000) button = (CButton**)((DWORD64)This + 8 * (index + 61)); + else if (os::buildNumber < 22621) + button = (CButton**)((DWORD64)This + 8 * (index + 63)); else button = (CButton**)((DWORD64)This + 8 * (index + 66));