Release - 2.1.1 臻fix

This commit is contained in:
wonfen 2025-02-27 03:18:23 +08:00
parent d23b2949d8
commit 2ce43ccd23
11 changed files with 47 additions and 29 deletions

View File

@ -1,9 +1,20 @@
## v2.1.0
## v2.1.1
**发行代号:臻**
代号释义: 千锤百炼臻至善,集性能跃升、功能拓展、交互焕新于一体,彰显持续打磨、全方位优化的迭代精神。
感谢 Tychristine 对社区群组管理做出的重大贡献!
2.1.1相对2.1.0(已下架不在提供)更新了:
- MacOS下支持彩色托盘图标和更好速率显示感谢Tunglies
- 文件类型判断不准导致脚本检测报错的问题
- 打开Win下的阴影(Win10因底层兼容性问题可能圆角和边框显示不太完美)
- 边框去白边
- 修复Linux下编译问题
- 修复热键无法关闭面板的问题
### 功能新增
- 新增窗口状态实时监控与自动保存功能

View File

@ -1,6 +1,6 @@
{
"name": "clash-verge",
"version": "2.1.0",
"version": "2.1.1",
"license": "GPL-3.0-only",
"scripts": {
"dev": "cross-env RUST_BACKTRACE=1 tauri dev",

10
pnpm-lock.yaml generated
View File

@ -62,8 +62,8 @@ importers:
specifier: 2.2.0
version: 2.2.0
"@tauri-apps/plugin-updater":
specifier: 2.4.0
version: 2.4.0
specifier: 2.3.0
version: 2.3.0
"@types/json-schema":
specifier: ^7.0.15
version: 7.0.15
@ -2291,10 +2291,10 @@ packages:
integrity: sha512-iC3Ic1hLmasoboG7BO+7p+AriSoqAwKrIk+Hpk+S/bjTQdXqbl2GbdclghI4gM32X0bls7xHzIFqhRdrlvJeaA==,
}
"@tauri-apps/plugin-updater@2.4.0":
"@tauri-apps/plugin-updater@2.3.0":
resolution:
{
integrity: sha512-BkeKN2WObAjobf2G77HyW/DxAfI0In+VSqWGnw/0cVPlM+VmA7fw9dKUnSunryZOG7ys9y07tj7FQa1ABMXGZQ==,
integrity: sha512-qdzyZEUN69FZQ/nRx51fBub10tT6wffJl3DLVo9q922Gvw8Wk++rZhoD9eethPlZYbog/7RGgT8JkrfLh5BKAg==,
}
"@types/babel__core@7.20.5":
@ -6279,7 +6279,7 @@ snapshots:
dependencies:
"@tauri-apps/api": 2.2.0
"@tauri-apps/plugin-updater@2.4.0":
"@tauri-apps/plugin-updater@2.3.0":
dependencies:
"@tauri-apps/api": 2.2.0

2
src-tauri/Cargo.lock generated
View File

@ -999,7 +999,7 @@ dependencies = [
[[package]]
name = "clash-verge"
version = "2.1.0"
version = "2.1.1"
dependencies = [
"aes-gcm",
"anyhow",

View File

@ -1,6 +1,6 @@
[package]
name = "clash-verge"
version = "2.1.0"
version = "2.1.1"
description = "clash verge"
authors = ["zzzgydi", "wonfen", "MystiPanda"]
license = "GPL-3.0-only"

View File

@ -78,9 +78,8 @@ impl SpeedRate {
let is_colorful = !crate::utils::help::is_monochrome_image_from_bytes(&icon_bytes).unwrap_or(false);
// 增加文本宽度和间距
let icon_text_gap = 80; // 增加图标和文本之间的间距
let text_width = 520; // 增加文本区域宽度,确保能显示完整
let total_width = icon_width + icon_text_gap + text_width;
let text_width = 580; // 文本区域宽度
let total_width = icon_width + text_width;
// 创建新的透明画布
let mut combined_image = RgbaImage::new(total_width, icon_height);
@ -112,11 +111,19 @@ impl SpeedRate {
let down_text = format_bytes_speed(rate.down);
// 计算文本位置,确保垂直间距合适
let text_x = icon_width + icon_text_gap;
let up_y = 0;
let down_y_offset = 32 as i32;
let down_y = icon_height as i32 - font_size as i32 + down_y_offset; // 下行速率显示在下方
// 修改文本位置为居右显示
let up_text_width = imageproc::drawing::text_size(scale, &font, &up_text).0 as u32;
let down_text_width = imageproc::drawing::text_size(scale, &font, &down_text).0 as u32;
// 计算右对齐的文本位置
let up_text_x = total_width - up_text_width;
let down_text_x = total_width - down_text_width;
// 优化垂直位置,使速率显示的高度和上下间距正好等于图标大小
let text_height = font_size as i32;
let total_text_height = text_height * 2;
let up_y = (icon_height as i32 - total_text_height) / 2;
let down_y = up_y + text_height;
// 绘制速率文本(先阴影后文字)
let shadow_offset = 1;
@ -125,7 +132,7 @@ impl SpeedRate {
draw_text_mut(
&mut combined_image,
shadow_color,
text_x as i32 + shadow_offset,
up_text_x as i32 + shadow_offset,
up_y + shadow_offset,
scale,
&font,
@ -134,7 +141,7 @@ impl SpeedRate {
draw_text_mut(
&mut combined_image,
text_color,
text_x as i32,
up_text_x as i32,
up_y,
scale,
&font,
@ -145,7 +152,7 @@ impl SpeedRate {
draw_text_mut(
&mut combined_image,
shadow_color,
text_x as i32 + shadow_offset,
down_text_x as i32 + shadow_offset,
down_y + shadow_offset,
scale,
&font,
@ -154,7 +161,7 @@ impl SpeedRate {
draw_text_mut(
&mut combined_image,
text_color,
text_x as i32,
down_text_x as i32,
down_y,
scale,
&font,

View File

@ -161,7 +161,7 @@ pub fn create_window() {
.maximizable(true)
.additional_browser_args("--enable-features=msWebView2EnableDraggableRegions --disable-features=OverscrollHistoryNavigation,msExperimentalScrolling")
.transparent(true)
.shadow(false)
.shadow(true)
.build();
#[cfg(target_os = "macos")]

View File

@ -25,7 +25,7 @@
"devUrl": "http://localhost:3000/"
},
"productName": "Clash Verge",
"version": "2.1.0",
"version": "2.1.1",
"identifier": "io.github.clash-verge-rev.clash-verge-rev",
"plugins": {
"deep-link": {

View File

@ -111,7 +111,7 @@
position: absolute;
top: 0;
left: 0;
right: 2px;
right: 0px;
bottom: 0px;
}
}

View File

@ -204,9 +204,9 @@ const Layout = () => {
({ palette }) => ({ bgcolor: palette.background.paper }),
{
borderRadius: "8px",
border: "2px solid var(--divider-color)",
width: "calc(100vw - 4px)",
height: "calc(100vh - 4px)",
border: "0px solid var(--divider-color)",
width: "calc(100vw - 1px)",
height: "calc(100vh - 1px)",
},
]}
>