Merge main into codex/graphic-attributes-cleanup

Resolve conflicts from main's rustfmt pass by taking main's versions of
command.rs, style.rs, view/mod.rs, scene/mod.rs, ui/window/mod.rs and
ui/properties.rs and re-applying this branch's Graphic Attributes changes.
Add the Graphic Attributes strings to the new lo-LA catalog.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E1QnME6WJbD5iGFae1eeCb
This commit is contained in:
Claude committed 2026-10-11 19:09:37 +00:00
commit 44f8f76ab3
596 files changed
+69069 -34120

No files matched your search

+1 -1
View File
@@ -1,5 +1,5 @@
use glam::{DVec2, DVec3};
use crate::t;
use glam::{DVec2, DVec3};
use crate::command::{CadCommand, CmdOption, CmdResult};
+3 -3
View File
@@ -1,6 +1,7 @@
// View module — viewport tools, navigation, visual styles, palettes, interface.
mod cascade;
mod count_palette;
mod file_tabs;
mod graphic_attributes_palette;
mod layout_tabs;
@@ -10,13 +11,11 @@ mod ortho;
mod pan;
mod persp;
pub mod plot_window;
pub mod quick_print;
mod properties_palette;
pub mod quick_print;
mod sheetset;
mod count_palette;
mod tile_horiz;
mod tile_vert;
pub mod visual_style;
mod tool_palettes;
pub mod ucs_cmd;
mod ucs_icon;
@@ -25,6 +24,7 @@ mod view_iso;
mod view_right;
mod view_top;
mod viewcube;
pub mod visual_style;
mod vports_config;
mod vports_join;
mod vports_named;
+8 -6
View File
@@ -5,8 +5,8 @@
use crate::command::{CadCommand, CmdResult};
use crate::scene::model::wire_model::WireModel;
use glam::DVec3;
use crate::t;
use glam::DVec3;
pub struct PlotWindowCommand {
p1: Option<DVec3>,
@@ -50,7 +50,8 @@ impl CadCommand for PlotWindowCommand {
true
}
fn on_mouse_move(&mut self, pt: DVec3) -> Option<WireModel> { let pt = pt.as_vec3();
fn on_mouse_move(&mut self, pt: DVec3) -> Option<WireModel> {
let pt = pt.as_vec3();
let p1 = self.p1?.as_vec3();
// Draw the selection rectangle.
Some(WireModel {
@@ -96,12 +97,13 @@ impl CadCommand for PlotWindowCommand {
plinegen: true,
fill_tris: vec![],
fill_tris_low: Vec::new(),
..Default::default()
})
})
}
}
// ── Autocomplete registry ─────────────────────────────────
inventory::submit!(crate::command::CommandRegistration { names: &["PLOTWINDOW"] }); // PlotWindowCommand
inventory::submit!(crate::command::CommandRegistration {
names: &["PLOTWINDOW"]
}); // PlotWindowCommand
+4 -2
View File
@@ -2,9 +2,9 @@
// selection's bounding box to a PDF (handled by the host). No dialog. (#325)
use crate::command::{CadCommand, CmdResult};
use crate::t;
use codec::Handle;
use glam::DVec3;
use crate::t;
pub struct QuickPrintCommand {
/// Latest selection set, refreshed on every selection action.
@@ -13,7 +13,9 @@ pub struct QuickPrintCommand {
impl QuickPrintCommand {
pub fn new() -> Self {
Self { handles: Vec::new() }
Self {
handles: Vec::new(),
}
}
}
+5 -5
View File
@@ -9,8 +9,8 @@
//! stay in one place. (#169)
use crate::command::{CadCommand, CmdResult};
use glam::DVec3;
use crate::t;
use glam::DVec3;
#[derive(Default)]
pub struct UcsCommand {
@@ -54,10 +54,10 @@ impl CadCommand for UcsCommand {
fn prompt(&self) -> String {
match self.option.as_deref() {
None => t!(
"UCS option [Face/OBject/World/View/3Point/Z/X/Y/Origin/Save/Delete] or name:"
)
.into_owned(),
None => {
t!("UCS option [Face/OBject/World/View/3Point/Z/X/Y/Origin/Save/Delete] or name:")
.into_owned()
}
Some("Z") => t!("UCS rotation angle about Z (degrees):").into_owned(),
Some("X") => t!("UCS rotation angle about X (degrees):").into_owned(),
Some("Y") => t!("UCS rotation angle about Y (degrees):").into_owned(),
+14 -10
View File
@@ -1,14 +1,13 @@
// ZOOM WINDOW command — pick two corners to define the zoom area.
use glam::{DVec3, Vec3};
use crate::t;
use glam::{DVec3, Vec3};
use crate::command::{CadCommand, CmdOption, CmdResult};
use crate::modules::{IconKind, ModuleEvent, ToolDef};
use crate::scene::model::wire_model::WireModel;
pub const ICON: IconKind =
IconKind::Svg(include_bytes!("../../../assets/icons/zoom_window.svg"));
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/zoom_window.svg"));
/// Ribbon button: zoom into a rectangle picked by two corners.
pub fn tool() -> ToolDef {
@@ -98,9 +97,10 @@ impl CadCommand for ZoomWindowCommand {
return Some(CmdResult::NeedPoint);
}
// A scale factor straight at the first prompt: n, nX or nXP.
upper if upper.ends_with('X')
|| upper.ends_with("XP")
|| crate::app::expr_eval::eval_number(&upper).is_some() =>
upper
if upper.ends_with('X')
|| upper.ends_with("XP")
|| crate::app::expr_eval::eval_number(&upper).is_some() =>
{
return Some(CmdResult::Dispatch(format!("ZOOM SCALE {text}")));
}
@@ -115,7 +115,10 @@ impl CadCommand for ZoomWindowCommand {
}
let pt = pt.as_vec3();
if let Some(p1) = self.first {
CmdResult::ZoomToWindow { p1: p1.as_dvec3(), p2: pt.as_dvec3() }
CmdResult::ZoomToWindow {
p1: p1.as_dvec3(),
p2: pt.as_dvec3(),
}
} else {
self.first = Some(pt);
CmdResult::NeedPoint
@@ -137,7 +140,8 @@ impl CadCommand for ZoomWindowCommand {
true
}
fn on_mouse_move(&mut self, pt: DVec3) -> Option<WireModel> { let pt = pt.as_vec3();
fn on_mouse_move(&mut self, pt: DVec3) -> Option<WireModel> {
let pt = pt.as_vec3();
let p1 = self.first?;
let min = p1.min(pt);
let max = p1.max(pt);
@@ -182,8 +186,8 @@ impl CadCommand for ZoomWindowCommand {
plinegen: true,
fill_tris: vec![],
fill_tris_low: Vec::new(),
..Default::default()
})
})
}
}