feat(display): add model lineweight scale

This commit is contained in:
Hakan Seven committed 2026-09-02 23:03:04 +03:00
1 parent edbc4d8ff8
commit 76bdab1e5b
11 files changed
+66 -19

No files matched your search

+11 -1
View File
@@ -1271,7 +1271,7 @@ impl OpenCADStudio {
// creating one doesn't silently reset them (its header default is
// 0 = no snaps); saving then persists them into the file.
self.stamp_header_sysvars(idx);
self.apply_bg_default(idx);
self.apply_display_defaults(idx);
self.sync_ribbon_layers();
self.sync_ribbon_styles();
// #21: reset ribbon Color / Linetype / Lineweight to the
@@ -5787,6 +5787,16 @@ impl OpenCADStudio {
Task::none()
}
Message::LineweightDisplayScaleChanged(value) => {
self.lineweight_display_scale = value.clamp(25, 200);
let scale = self.lineweight_display_scale as f32 / 100.0;
for tab in &mut self.tabs {
tab.scene.model_lineweight_scale = scale;
}
self.persist_settings_if_changed();
Task::none()
}
Message::CrosshairColorChanged(value) => {
self.crosshair_color_input = value.clone();
if value.trim().is_empty() {