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

+20 -6
View File
@@ -196,7 +196,9 @@ pub fn all_themes() -> Vec<iced::Theme> {
}
pub fn builtin_theme(name: &str) -> Option<iced::Theme> {
all_themes().into_iter().find(|theme| theme.to_string() == name)
all_themes()
.into_iter()
.find(|theme| theme.to_string() == name)
}
fn color_to_rgb(color: iced::Color) -> [u8; 3] {
@@ -369,7 +371,9 @@ impl ModelSpaceThemeConfig {
pub fn resolve_selection_color(&self) -> [f32; 4] {
if self.selection_highlight_color == 0 {
crate::scene::model::wire_model::WireModel::SELECTED
} else if let Some((r, g, b)) = codec::types::aci_table::aci_to_rgb(self.selection_highlight_color) {
} else if let Some((r, g, b)) =
codec::types::aci_table::aci_to_rgb(self.selection_highlight_color)
{
[r as f32 / 255.0, g as f32 / 255.0, b as f32 / 255.0, 1.0]
} else {
crate::scene::model::wire_model::WireModel::SELECTED
@@ -605,7 +609,8 @@ mod tests {
original.model_space.selection_window_color = 5;
let serialized = serde_json::to_string(&original).expect("serialize config");
let deserialized: AppConfig = serde_json::from_str(&serialized).expect("deserialize config");
let deserialized: AppConfig =
serde_json::from_str(&serialized).expect("deserialize config");
assert_eq!(deserialized.model_space.mode, ModelSpaceMode::Custom);
assert_eq!(deserialized.model_space.custom_bg, Some([12, 34, 56]));
@@ -630,9 +635,18 @@ mod tests {
fn test_parse_theme_name() {
assert_eq!(parse_theme_name("light"), Some(iced::Theme::Light));
assert_eq!(parse_theme_name("DARK"), Some(iced::Theme::Dark));
assert_eq!(parse_theme_name("solarized light"), Some(iced::Theme::SolarizedLight));
assert_eq!(parse_theme_name("tokyo-night-storm"), Some(iced::Theme::TokyoNightStorm));
assert_eq!(parse_theme_name("Kanagawa_Lotus"), Some(iced::Theme::KanagawaLotus));
assert_eq!(
parse_theme_name("solarized light"),
Some(iced::Theme::SolarizedLight)
);
assert_eq!(
parse_theme_name("tokyo-night-storm"),
Some(iced::Theme::TokyoNightStorm)
);
assert_eq!(
parse_theme_name("Kanagawa_Lotus"),
Some(iced::Theme::KanagawaLotus)
);
assert_eq!(parse_theme_name("1"), None);
assert_eq!(parse_theme_name("0"), None);
assert_eq!(parse_theme_name("nonexistent_theme"), None);