forked from 1b-agent/opencadstudio-upstream
fix(ui): add non-color marker to CLI info entries and drop dead desk parameter
- Add 'i ' prefix to EntryKind::Info and coordinate set_step_prompt deduplication to satisfy WCAG 1.4.1 across all 22 themes - Drop unused _desk parameter from crosshair_background and clean up its call sites - Document AutoCAD-standard context-based crosshair drafting surface architecture in crosshair_background - Add doc comments documenting deliberate alpha omission in canvas_is_light and backlog scope in is_wide
This commit is contained in:
1 parent
b53cd580f6
commit
a9fda66ac0
3 files changed
+46
-11
No files matched your search
@@ -70,11 +70,14 @@ pub(crate) fn accessible_accent(accent: Color, bg: Color, fallback: Color) -> Co
|
||||
}
|
||||
|
||||
/// Returns true if the given canvas background color has a WCAG relative luminance > 0.5 (light surface).
|
||||
/// Ignores alpha assuming canvas backgrounds are opaque (or composited against default viewport clear).
|
||||
pub(crate) fn canvas_is_light(bg: [f32; 4]) -> bool {
|
||||
wcag_luminance(Color::from_rgb(bg[0], bg[1], bg[2])) > 0.5
|
||||
}
|
||||
|
||||
/// True if a character is East Asian Wide or Fullwidth (CJK ideographs, kana, hangul, fullwidth forms).
|
||||
/// Approximation of East Asian Wide/Fullwidth; not exhaustive (e.g. emoji ranges and CJK Extension B+
|
||||
/// beyond 0x2FA1F omitted for the backlog).
|
||||
pub(crate) fn is_wide(c: char) -> bool {
|
||||
let u = c as u32;
|
||||
matches!(
|
||||
|
||||
Reference in new issue
Block a user