forked from 1b-agent/opencadstudio-upstream
chore: remove dead UI helpers and orphan toolbar stubs
Each item below was gated by #[allow(dead_code)] and has zero callers across src/ — none of them are part of any public API consumed by external crates (this is a binary, not a library): * modules/insert/underlay_frames.rs + edit_aliases.rs — toolbar stubs whose `tool()` registrars were never wired into the ribbon; the parent mod.rs inlines its own include_bytes! for the SVGs, so the files were orphan dead weight. * ui/snap_popup.rs:snap_marker_color — never called. * ui/ribbon/mod.rs:last_dropdown_cmd — never called. * ui/scale_popup.rs:anno_scale_for_label — never called. * ui/layers.rs:color_name_to_aci — inverse of aci_color_display with zero call sites. * linetypes.rs:name_list — never called. * scene/pipeline/wire_gpu.rs:new_ghost — never called. Co-Authored-By: Claude Opus 4.7 <[email protected]>
This commit is contained in:
1 parent
15bddb2f58
commit
22543e4f97
10 files changed
-105
No files matched your search
@@ -838,22 +838,6 @@ fn color_label_aci(i: u8) -> &'static str {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn color_name_to_aci(name: &str) -> u8 {
|
||||
match name {
|
||||
"red" => 1,
|
||||
"yellow" => 2,
|
||||
"green" => 3,
|
||||
"cyan" => 4,
|
||||
"blue" => 5,
|
||||
"magenta" => 6,
|
||||
"white" => 7,
|
||||
"dark gray" => 8,
|
||||
"gray" => 9,
|
||||
_ => 7,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn iced_color_from_acad(c: &AcadColor) -> Color {
|
||||
match c {
|
||||
AcadColor::Index(i) => {
|
||||
|
||||
@@ -180,15 +180,6 @@ impl Ribbon {
|
||||
self.open_dropdown = None;
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn last_dropdown_cmd(
|
||||
&self,
|
||||
dropdown_id: &'static str,
|
||||
default: &'static str,
|
||||
) -> &'static str {
|
||||
self.last_cmd.get(dropdown_id).copied().unwrap_or(default)
|
||||
}
|
||||
|
||||
// ── View ──────────────────────────────────────────────────────────────
|
||||
|
||||
pub fn view(
|
||||
|
||||
@@ -23,15 +23,6 @@ const COMMON_SCALES: &[(&str, f32, f64)] = &[
|
||||
("10:1", 0.1, 10.00),
|
||||
];
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn anno_scale_for_label(label: &str) -> f32 {
|
||||
COMMON_SCALES
|
||||
.iter()
|
||||
.find(|&&(l, _, _)| l == label)
|
||||
.map(|&(_, a, _)| a)
|
||||
.unwrap_or(1.0)
|
||||
}
|
||||
|
||||
/// Full-screen overlay: transparent click-catcher + scale list panel pinned bottom-right.
|
||||
///
|
||||
/// - `is_model`: true = model space (dispatches SetAnnotationScale), false = paper space (SetViewportScale).
|
||||
|
||||
@@ -233,27 +233,3 @@ const LABEL_OFF: Color = Color {
|
||||
a: 1.0,
|
||||
};
|
||||
|
||||
/// The `Point` parameter is unused today; kept for future tooltip positioning.
|
||||
#[allow(dead_code)]
|
||||
pub fn snap_marker_color(snap_type: SnapType) -> Color {
|
||||
match snap_type {
|
||||
SnapType::Endpoint | SnapType::Midpoint => Color {
|
||||
r: 1.0,
|
||||
g: 0.9,
|
||||
b: 0.1,
|
||||
a: 1.0,
|
||||
},
|
||||
SnapType::Grid => Color {
|
||||
r: 0.4,
|
||||
g: 0.9,
|
||||
b: 0.4,
|
||||
a: 1.0,
|
||||
},
|
||||
_ => Color {
|
||||
r: 1.0,
|
||||
g: 0.9,
|
||||
b: 0.1,
|
||||
a: 1.0,
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user