diff --git a/crates/app-iced/src/pages/appearance/section.rs b/crates/app-iced/src/pages/appearance/section.rs index a35dfd5..86dfbbe 100644 --- a/crates/app-iced/src/pages/appearance/section.rs +++ b/crates/app-iced/src/pages/appearance/section.rs @@ -88,14 +88,12 @@ pub fn section<'a>(ui: &'a Ui, state: &'a State) -> Element<'a, Message> { ), ], )); - // 档位照常显示用户选的值(不偷偷改成「直角」);α<1 时只补一句状态(裁定 A)。 - let mut notes = vec![t(Key::SettingsAppearanceCornerHint)]; + // 状态行(r5 P2-1):只在「跟随系统 + α<1」出现;Tertiary + 加粗,与下面的说明段刻意不同形。 if corner == WindowCorner::System && state.window_opacity < 1.0 { - notes.push(t(Key::SettingsAppearanceCornerSuspended)); - } - for note in notes { - rows = rows.push(note_line(ui, note, ui.color(Role::OnSurfaceVariant))); + rows = rows.push(state_line(ui, t(Key::SettingsAppearanceCornerSuspended))); } + let tone = ui.color(Role::OnSurfaceVariant); + rows = rows.push(note_line(ui, t(Key::SettingsAppearanceCornerHint), tone)); // ③ 面板透明度(CPU 档强制 1.0) let forced = state.panel_is_forced(); @@ -283,6 +281,12 @@ fn note_line<'a>(ui: &'a Ui, content: &str, color: Color) -> Element<'a, Message frame::text_role_owned(ui, TypeRole::BodySmall, false, content.to_owned(), color) } +/// 状态行(r5 P2-1):与说明段刻意不同形——`Role::Tertiary` + 强调字重,让「当前不生效」被当成状态看见。 +fn state_line<'a>(ui: &'a Ui, text: &str) -> Element<'a, Message> { + let tone = ui.color(Role::Tertiary); + frame::text_role_owned(ui, TypeRole::BodySmall, true, text.to_owned(), tone) +} + /// 一行「标签 + 值 + 滑块 + 说明」。 fn slider_row<'a>( ui: &'a Ui, diff --git a/crates/app-iced/src/platform/win32/corner/tests.rs b/crates/app-iced/src/platform/win32/corner/tests.rs index 5d70945..796db2d 100644 --- a/crates/app-iced/src/platform/win32/corner/tests.rs +++ b/crates/app-iced/src/platform/win32/corner/tests.rs @@ -159,7 +159,8 @@ fn the_log_line_carries_every_field() { /// /// 抓得住:字段被删/改名/顺序错乱(`excluded_reason` 少一栏、`radius=system` 丢了、 /// `frame` / `layered` 被挪出这一行)——这些都会让「没生效 vs 生效了看不见」的区分重新变成猜谜。 -/// 抓不住:产品进程里那一行到底长什么样(本 mission 没构建 bin;合并态由 tower 编 `--bins` 补)。 +/// 抓不住:**产品进程**里那一行(本测试只钉格式)。真值已有:2026-11-04 两次真跑产品 bin +/// (α=1.0 / α=0.85)的 `[corner] boot …` 两行,见 `DevDocs/artifacts/m116/README.md`。 #[test] fn the_log_line_shape_is_pinned_with_the_measured_readings() { // 本机实测:Server 2025 / build 26100;读回 `E_INVALIDARG`;产品形状是 `overlapped`, diff --git a/crates/i18n/src/catalog/golden.rs b/crates/i18n/src/catalog/golden.rs index 2b4addd..cc631e9 100644 --- a/crates/i18n/src/catalog/golden.rs +++ b/crates/i18n/src/catalog/golden.rs @@ -60,7 +60,7 @@ pub(super) const GOLDEN: &[(&str, &str, &str)] = &[ ("SettingsAppearanceCorner", "Window corners", "窗口圆角"), ("SettingsAppearanceCornerSystem", "Follow system", "跟随系统"), ("SettingsAppearanceCornerSquare", "Square", "直角"), - ("SettingsAppearanceCornerHint", "On Windows 11 and Server 2025 we ask the system to round the window; whether it does, and how the edge looks, is up to the compositor. Software rendering does not change that - corners are drawn by the system, not by our renderer. While window transparency is below 100%, Windows does not round the window; the corners come back at 100%. Windows 10 keeps square corners. On macOS and Linux the desktop's own rules apply, and we never draw corners ourselves.", "Windows 11 与 Windows Server 2025 上我们请求系统处理窗口外框圆角:是否圆、边缘什么样由系统合成器决定(软件渲染也一样——圆角由系统画,不由我们的渲染器画)。开启整窗透明度(低于 100%)时,Windows 不会给窗口圆角;透明度回到 100% 圆角自动恢复。Windows 10 保持直角;macOS 与 Linux 交给桌面自己的规则,我们不自己画圆角。"), + ("SettingsAppearanceCornerHint", "On Windows 11 and Server 2025 we ask the system for rounded corners; Windows 10 keeps square corners. On macOS and Linux the desktop's own rules apply. We never draw corners ourselves.", "Windows 11 与 Windows Server 2025 上我们请求系统处理外框圆角;Windows 10 保持直角;macOS 与 Linux 交给桌面合成器自己的规则;我们不自己画圆角。"), ("SettingsAppearanceCornerSuspended", "Not in effect right now: window transparency is below 100%. Setting it back to 100% restores the rounded corners.", "当前因整窗透明度不生效:把整窗透明度调回 100% 圆角即恢复。"), ("CoreTextUntranslated", "[system text not translated]", "[未翻译的系统文案]"), ("DownloadTitle", "Version management", "版本管理"), diff --git a/crates/i18n/src/catalog/settings/appearance.rs b/crates/i18n/src/catalog/settings/appearance.rs index bfa8f42..907e9a2 100644 --- a/crates/i18n/src/catalog/settings/appearance.rs +++ b/crates/i18n/src/catalog/settings/appearance.rs @@ -21,8 +21,8 @@ macro_rules! settings_appearance_entries { SettingsAppearanceCornerSystem => ("Follow system", "跟随系统"), SettingsAppearanceCornerSquare => ("Square", "直角"), SettingsAppearanceCornerHint => ( - "On Windows 11 and Server 2025 we ask the system to round the window; whether it does, and how the edge looks, is up to the compositor. Software rendering does not change that - corners are drawn by the system, not by our renderer. While window transparency is below 100%, Windows does not round the window; the corners come back at 100%. Windows 10 keeps square corners. On macOS and Linux the desktop's own rules apply, and we never draw corners ourselves.", - "Windows 11 与 Windows Server 2025 上我们请求系统处理窗口外框圆角:是否圆、边缘什么样由系统合成器决定(软件渲染也一样——圆角由系统画,不由我们的渲染器画)。开启整窗透明度(低于 100%)时,Windows 不会给窗口圆角;透明度回到 100% 圆角自动恢复。Windows 10 保持直角;macOS 与 Linux 交给桌面自己的规则,我们不自己画圆角。" + "On Windows 11 and Server 2025 we ask the system for rounded corners; Windows 10 keeps square corners. On macOS and Linux the desktop's own rules apply. We never draw corners ourselves.", + "Windows 11 与 Windows Server 2025 上我们请求系统处理外框圆角;Windows 10 保持直角;macOS 与 Linux 交给桌面合成器自己的规则;我们不自己画圆角。" ), SettingsAppearanceCornerSuspended => ( "Not in effect right now: window transparency is below 100%. Setting it back to 100% restores the rounded corners.",