fix: 修正 Windows 标题栏 overlay 计算过小导致的控件重叠并升级到 4.1.7

This commit is contained in:
ILoveBingLu
2026-04-08 20:54:01 +08:00
parent ade1e14402
commit e4cf1893f4
5 changed files with 21 additions and 6 deletions
+8
View File
@@ -10,6 +10,14 @@
### 变更
- 暂无
## [4.1.7] - 2026-04-08
### 修复
- 修复 Windows 独立窗口标题栏在读取原生 overlay 几何后把右侧保底安全区压缩过小的问题,避免朋友圈右上角按钮再次进入系统窗口控件区域
### 变更
- 调整独立窗口标题栏安全区换算逻辑,改为平台保底值与 overlay 实测值取最大值,避免实测值异常时覆盖默认避让
## [4.1.6] - 2026-04-08
### 修复
+1 -1
View File
@@ -7,7 +7,7 @@
**一款现代化的微信聊天记录查看与分析工具**
[![License](https://img.shields.io/badge/license-CC--BY--NC--SA--4.0-blue.svg)](LICENSE)
[![Version](https://img.shields.io/badge/version-4.1.6-green.svg)](package.json)
[![Version](https://img.shields.io/badge/version-4.1.7-green.svg)](package.json)
[![Platform](https://img.shields.io/badge/platform-Windows-0078D6.svg?logo=windows)]()
[![Electron](https://img.shields.io/badge/Electron-39-47848F.svg?logo=electron)]()
[![React](https://img.shields.io/badge/React-19-61DAFB.svg?logo=react)]()
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "ciphertalk",
"version": "4.1.6",
"version": "4.1.7",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "ciphertalk",
"version": "4.1.6",
"version": "4.1.7",
"hasInstallScript": true,
"license": "CC-BY-NC-SA-4.0",
"dependencies": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "ciphertalk",
"version": "4.1.6",
"version": "4.1.7",
"description": "密语 - 微信聊天记录查看工具",
"author": "ILoveBingLu",
"license": "CC-BY-NC-SA-4.0",
+9 -2
View File
@@ -98,11 +98,18 @@ export function syncWindowControlsOverlayToDocument(
}
const normalizedPlatform = normalizeWindowPlatform(platform)
const fallbackMetrics = getWindowChromeMetrics(normalizedPlatform)
const overlayPadding = WINDOW_CONTROLS_OVERLAY_PADDING[normalizedPlatform]
const controlsRightWidth = Math.max(0, viewportWidth - titlebarAreaRect.x - titlebarAreaRect.width)
const chromeHeight = Math.max(parsePixels(WINDOW_CHROME_HEIGHT), titlebarAreaRect.height)
const controlsLeftSafe = Math.max(overlayPadding.left, titlebarAreaRect.x + overlayPadding.left)
const controlsRightSafe = Math.max(overlayPadding.right, controlsRightWidth + overlayPadding.right)
const controlsLeftSafe = Math.max(
parsePixels(fallbackMetrics.controlsLeftSafe),
titlebarAreaRect.x + overlayPadding.left
)
const controlsRightSafe = Math.max(
parsePixels(fallbackMetrics.controlsRightSafe),
controlsRightWidth + overlayPadding.right
)
root.style.setProperty('--window-chrome-height', toPixels(chromeHeight))
root.style.setProperty('--window-controls-left-safe', toPixels(controlsLeftSafe))