fix(cursor): restore default geometry

Keep CURSORSIZE 5 and PICKBOX 3 mapped to the pre-option 60 px arms, 15 px box, and 8 px selection aperture.\n\nRefs #413
This commit is contained in:
Hakan Seven committed 2026-08-08 21:53:26 +03:00
1 parent 1738f9a79b
commit 8847724127
4 files changed
+63 -20

No files matched your search

+2 -2
View File
@@ -448,9 +448,9 @@ pub(super) struct OpenCADStudio {
zoom_wheel_reversed: bool,
/// Mouse-wheel zoom sensitivity, clamped to 3..=100 (ZOOMFACTOR).
zoom_factor: i32,
/// Crosshair reach as a viewport percentage (CURSORSIZE, 1..=100).
/// Crosshair size setting (CURSORSIZE, 1..=100).
cursor_size: i32,
/// Selection-box half-size and click aperture in pixels (PICKBOX, 0..=50).
/// Selection-box size setting (PICKBOX, 0..=50).
pick_box: i32,
/// Drawing viewport cursor style (CURSORTYPE).
cursor_type: settings::CursorType,
+2 -2
View File
@@ -156,9 +156,9 @@ pub struct UserSettings {
pub polar_increment_deg: f32,
pub zoom_wheel_reversed: bool,
pub zoom_factor: i32,
/// CURSORSIZE: crosshair arm reach as a percentage of the viewport.
/// CURSORSIZE: normalized crosshair reach; 5 retains the original 60 px arms.
pub cursor_size: i32,
/// PICKBOX: visible selection-box half-size and click aperture in pixels.
/// PICKBOX: normalized visible-box and click-aperture size.
pub pick_box: i32,
/// CURSORTYPE: crosshair or the platform pointer over the drawing.
pub cursor_type: CursorType,
+12 -12
View File
@@ -1778,7 +1778,7 @@ impl OpenCADStudio {
eye,
bounds,
self.tabs[i].scene.document.header.lineweight_display,
self.pick_box.max(1) as f32,
crate::ui::overlay::pick_box_aperture_px(self.pick_box),
)
.and_then(|s| Scene::handle_from_wire_name(s))
.or_else(|| {
@@ -2941,7 +2941,7 @@ impl OpenCADStudio {
view_rot2,
eye2,
bounds,
self.pick_box.max(1) as f32 * 2.0,
crate::ui::overlay::pick_box_aperture_px(self.pick_box) * 2.0,
);
let include_fills = self.tabs[i]
.active_cmd
@@ -2962,7 +2962,7 @@ impl OpenCADStudio {
eye2,
bounds,
self.tabs[i].scene.document.header.lineweight_display,
self.pick_box.max(1) as f32,
crate::ui::overlay::pick_box_aperture_px(self.pick_box),
)
.and_then(|s| Scene::handle_from_wire_name(s))
.or_else(|| {
@@ -3491,7 +3491,7 @@ impl OpenCADStudio {
view_rot,
eye,
bounds,
self.pick_box.max(1) as f32 * 2.0,
crate::ui::overlay::pick_box_aperture_px(self.pick_box) * 2.0,
);
let candidate_handles = self.tabs[i]
.scene
@@ -3511,7 +3511,7 @@ impl OpenCADStudio {
eye,
bounds,
self.tabs[i].scene.document.header.lineweight_display,
self.pick_box.max(1) as f32,
crate::ui::overlay::pick_box_aperture_px(self.pick_box),
)
.into_iter()
.filter_map(|s| Scene::handle_from_wire_name(s))
@@ -3533,7 +3533,7 @@ impl OpenCADStudio {
eye,
bounds,
self.tabs[i].scene.document.header.lineweight_display,
self.pick_box.max(1) as f32,
crate::ui::overlay::pick_box_aperture_px(self.pick_box),
)
.and_then(|s| Scene::handle_from_wire_name(s))
.or_else(|| {
@@ -3875,7 +3875,7 @@ impl OpenCADStudio {
view_rot,
eye,
bounds,
self.pick_box.max(1) as f32 * 2.0,
crate::ui::overlay::pick_box_aperture_px(self.pick_box) * 2.0,
);
let candidate_handles = self.tabs[i]
.scene
@@ -3890,7 +3890,7 @@ impl OpenCADStudio {
eye,
bounds,
self.tabs[i].scene.document.header.lineweight_display,
self.pick_box.max(1) as f32,
crate::ui::overlay::pick_box_aperture_px(self.pick_box),
)
.and_then(|s| Scene::handle_from_wire_name(s))
.or_else(|| {
@@ -3995,7 +3995,7 @@ impl OpenCADStudio {
view_rot,
eye,
bounds,
self.pick_box.max(1) as f32 * 2.0,
crate::ui::overlay::pick_box_aperture_px(self.pick_box) * 2.0,
);
scene::pick::hit_test::click_hit(
p,
@@ -4004,7 +4004,7 @@ impl OpenCADStudio {
eye,
bounds,
self.tabs[i].scene.document.header.lineweight_display,
self.pick_box.max(1) as f32,
crate::ui::overlay::pick_box_aperture_px(self.pick_box),
)
.and_then(|s| Scene::handle_from_wire_name(s))
.and_then(|h| {
@@ -4410,7 +4410,7 @@ impl OpenCADStudio {
view_rot,
eye,
bounds,
self.pick_box.max(1) as f32 * 2.0,
crate::ui::overlay::pick_box_aperture_px(self.pick_box) * 2.0,
);
let candidate_ms = candidate_started.elapsed().as_secs_f64() * 1000.0;
let candidate_count = hover_candidates.len();
@@ -4430,7 +4430,7 @@ impl OpenCADStudio {
eye,
bounds,
self.tabs[i].scene.document.header.lineweight_display,
self.pick_box.max(1) as f32,
crate::ui::overlay::pick_box_aperture_px(self.pick_box),
)
.and_then(Scene::handle_from_wire_name);
let wire_ms = wire_started.elapsed().as_secs_f64() * 1000.0;