From f237c548a74aec46f50947a542cf36d2108bf2ed Mon Sep 17 00:00:00 2001 From: fanlusky <1730976608@qq.com> Date: Fri, 24 Jul 2026 03:46:28 +0800 Subject: [PATCH] fix: restore candidate preedit caret height and baseline alignment Cap the caret at 1.2em with a 10% downward offset so it sits on the text baseline again, and mirror the same styling in horizontal windows and the settings preview. --- .../webview2/candwnd/horizontal_candidate_window_dark.html | 4 ++-- .../webview2/candwnd/horizontal_candidate_window_light.html | 4 ++-- ui-html/webview2/candwnd/vertical_candidate_window_dark.html | 4 ++-- ui-html/webview2/candwnd/vertical_candidate_window_light.html | 4 ++-- .../ime-settings/src/styles/modules/candidate/style-h.css | 4 ++-- .../ime-settings/src/styles/modules/candidate/style-v.css | 3 ++- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/ui-html/webview2/candwnd/horizontal_candidate_window_dark.html b/ui-html/webview2/candwnd/horizontal_candidate_window_dark.html index 53958f4b..2daa0669 100644 --- a/ui-html/webview2/candwnd/horizontal_candidate_window_dark.html +++ b/ui-html/webview2/candwnd/horizontal_candidate_window_dark.html @@ -39,9 +39,9 @@ .cursor { display: inline-block; width: 1.5px; - height: 1em; + height: 1.2em; background: #6b69d6; - transform: translate(1.3px, 6%); + transform: translate(1.3px, 10%); } .row { diff --git a/ui-html/webview2/candwnd/horizontal_candidate_window_light.html b/ui-html/webview2/candwnd/horizontal_candidate_window_light.html index 03c65cbf..024e032f 100644 --- a/ui-html/webview2/candwnd/horizontal_candidate_window_light.html +++ b/ui-html/webview2/candwnd/horizontal_candidate_window_light.html @@ -39,9 +39,9 @@ .cursor { display: inline-block; width: 1.5px; - height: 1em; + height: 1.2em; background: #6b69d6; - transform: translate(1.3px, 6%); + transform: translate(1.3px, 10%); } .row { diff --git a/ui-html/webview2/candwnd/vertical_candidate_window_dark.html b/ui-html/webview2/candwnd/vertical_candidate_window_dark.html index 22526015..181f4305 100644 --- a/ui-html/webview2/candwnd/vertical_candidate_window_dark.html +++ b/ui-html/webview2/candwnd/vertical_candidate_window_dark.html @@ -37,9 +37,9 @@ .cursor { display: inline-block; width: 1.5px; - height: 1.4em; + height: 1.2em; background: #6b69d6; - transform: translate(1.4px, 0px); + transform: translate(1.4px, 10%); } .row { diff --git a/ui-html/webview2/candwnd/vertical_candidate_window_light.html b/ui-html/webview2/candwnd/vertical_candidate_window_light.html index 24a0ce94..ef54f396 100644 --- a/ui-html/webview2/candwnd/vertical_candidate_window_light.html +++ b/ui-html/webview2/candwnd/vertical_candidate_window_light.html @@ -37,9 +37,9 @@ .cursor { display: inline-block; width: 1.5px; - height: 1.4em; + height: 1.2em; background: #6b69d6; - transform: translate(1.4px, 0px); + transform: translate(1.4px, 10%); } .row { diff --git a/ui-html/webview2/settings/ime-settings/src/styles/modules/candidate/style-h.css b/ui-html/webview2/settings/ime-settings/src/styles/modules/candidate/style-h.css index 2786f875..5504b263 100644 --- a/ui-html/webview2/settings/ime-settings/src/styles/modules/candidate/style-h.css +++ b/ui-html/webview2/settings/ime-settings/src/styles/modules/candidate/style-h.css @@ -18,9 +18,9 @@ display: inline-block; margin-left: 1px; width: 1.5px; - height: 1em; + height: 1.2em; background: var(--accent-strong); - transform: translateY(1px); + transform: translateY(10%); } .row { diff --git a/ui-html/webview2/settings/ime-settings/src/styles/modules/candidate/style-v.css b/ui-html/webview2/settings/ime-settings/src/styles/modules/candidate/style-v.css index 221caec0..64c5c336 100644 --- a/ui-html/webview2/settings/ime-settings/src/styles/modules/candidate/style-v.css +++ b/ui-html/webview2/settings/ime-settings/src/styles/modules/candidate/style-v.css @@ -16,8 +16,9 @@ display: inline-block; margin-left: 1px; width: 1.5px; - height: 1em; + height: 1.2em; background: var(--accent-strong); + transform: translateY(10%); } .row {