fix(app-iced): M116 r5 —— 圆角状态行独立成「状态」(换色加粗)+ 说明段去掉重复并压短
r5 复审 p2-1(图上)、p2-2(证据文档两处)。 ## P2-1:状态行要被当成「状态」看见 - 说明段 `SettingsAppearanceCornerHint` 里那句 α 说明**删掉**,只留平台分工(Win11/Server 2025 请求系统圆角、Win10 直角、macOS/Linux 看桌面合成器、我们不自绘)——英文从约 470 字符 / 7 行压到 3 行(1180 宽、100% DPI 实测)。 - `SettingsAppearanceCornerSuspended` 改成**只由状态行说**,且状态行不再是「说明段的续行」: 紧贴在档位行下面,颜色换成设计令牌 `Role::Tertiary`、字重加粗(`note_line` 保持原形, 新增 4 行的 `state_line` 助手)。档位本身照常显示用户选的值,不改成「直角」。 - 出图复核(四张,浅/深 × α=100/85):α=85 两张能看到一条**加粗的第三色**状态行, α=100 两张没有;状态行墨色由 `(63,76,87)`(与说明段同色)变为 `(116,108,140)`(Tertiary)。 ## P2-2:证据文档两处 - `DevDocs/artifacts/m116/probe-table.md` 的 `readback` 归因:`0x04000000`=`WS_CLIPSIBLINGS` 是 **`CreateWindowExW` 自己补的**(建完就在),`ShowWindow` **只补** `0x10000000`=`WS_VISIBLE`; 按 r5 复审的最小实验写清(req `0x00CF0000` → before `0x04CF0000` → after `0x14CF0000`), 读数一行未动。 - `corner/tests.rs` 里「本 mission 没构建 bin」改成指向 2026-11-04 的两次真跑记录 (`DevDocs/artifacts/m116/README.md` 的 `[corner] boot …` 两行)。 门禁(`CARGO_TARGET_DIR=C:/Temp/ull-target/wt-116-r2`,`-j 2`,跑完已删): fmt --check 0 / `cargo test -p unlucky-app-iced --lib` 0(475 passed)/ `-p unlucky-i18n --lib` 0(24 passed)。
This commit is contained in:
1 parent
91f723a019
commit
67deb103b0
4 files changed
+15
-10
No files matched your search
@@ -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,
|
||||
|
||||
@@ -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`,
|
||||
|
||||
@@ -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", "版本管理"),
|
||||
|
||||
@@ -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.",
|
||||
|
||||
Reference in new issue
Block a user