From 1ca398b0b7ec209b90f4eae6e0842b223a01c93a Mon Sep 17 00:00:00 2001 From: moppeeer Date: Thu, 29 Oct 2026 19:00:00 +0100 Subject: [PATCH] Anchor point sections: the Properties helpers they use from main's split modules Co-Authored-By: Claude Opus 5.5 --- crates/ui-egui/src/panels/properties.rs | 2 +- crates/ui-egui/src/panels/properties/object.rs | 2 +- crates/ui-egui/src/panels/properties/object_panels.rs | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/crates/ui-egui/src/panels/properties.rs b/crates/ui-egui/src/panels/properties.rs index 8978edbe2..67c28f601 100644 --- a/crates/ui-egui/src/panels/properties.rs +++ b/crates/ui-egui/src/panels/properties.rs @@ -32,7 +32,7 @@ pub(crate) use links::run_update_links; pub use links::{info_panel, links_panel, preflight_panel, update_links}; use object::{align_row, appearance_section, guide_section, quick_actions_object, transform_section, wrap_section}; pub(crate) use object::{corner_type_dropdown, ref_point_proxy, stroke_type_dropdown}; -use object_panels::pathfinder_row; +use object_panels::{anchor_point_sections, pathfinder_row}; pub use object_panels::{align_panel, attributes_panel, effects_panel, pathfinder_panel, stroke_panel, wrap_panel}; pub(crate) use text::{LANGUAGES, kerning_control, language_menu}; use text::{ diff --git a/crates/ui-egui/src/panels/properties/object.rs b/crates/ui-egui/src/panels/properties/object.rs index 50969f415..c025aad89 100644 --- a/crates/ui-egui/src/panels/properties/object.rs +++ b/crates/ui-egui/src/panels/properties/object.rs @@ -94,7 +94,7 @@ pub(super) fn transform_section(app: &mut DesignApp, ui: &mut Ui, i: &SelInfo) { /// Properties › Transform for points selected with Direct Selection: X/Y/W/H of the points' /// bounds (from the reference point); X and Y move the points, W and H spread or gather them /// about the reference point. No angles: those turn objects. -fn anchor_transform_section(app: &mut DesignApp, ui: &mut Ui, i: &SelInfo) { +pub(super) fn anchor_transform_section(app: &mut DesignApp, ui: &mut Ui, i: &SelInfo) { let u = units(app); let rp = app.ui.ref_point; let b = block(ui, 2.0 * FIELD_H + 4.0); diff --git a/crates/ui-egui/src/panels/properties/object_panels.rs b/crates/ui-egui/src/panels/properties/object_panels.rs index 08228023d..8e6c210de 100644 --- a/crates/ui-egui/src/panels/properties/object_panels.rs +++ b/crates/ui-egui/src/panels/properties/object_panels.rs @@ -1,6 +1,7 @@ +use super::object::{anchor_transform_section, appearance_section}; use super::{ - Arrowhead, Cap, DesignApp, Join, Sense, Stroke, StrokeAlign, StrokeType, Tokens, Ui, Value, caption, divider, icon_toggle, icons, json, measure, - number, pos2, sel_info, text_attrs, units, vec2, widgets, + Arrowhead, Cap, DesignApp, Join, SelInfo, Sense, Stroke, StrokeAlign, StrokeType, Tokens, Ui, Value, caption, divider, full_width, icon_toggle, + icons, json, measure, number, outline_button, pos2, rule, section, section_row, sel_info, text_attrs, units, vec2, widgets, }; /// Stroke panel: weight, cap, miter limit, join, alignment, type, arrowheads, gap colour. @@ -366,7 +367,7 @@ const CONVERT_SHAPE: [(&str, &str, &str); 9] = [ /// Points selected with Direct Selection, as InDesign's Properties shows them: Transform, /// Appearance, Convert Points (the point type of the selected points) and Delete Point(s). -fn anchor_point_sections(app: &mut DesignApp, ui: &mut Ui, i: &SelInfo) { +pub(super) fn anchor_point_sections(app: &mut DesignApp, ui: &mut Ui, i: &SelInfo) { section(ui, crate::i18n::tr(&app.ui.language, "Transform"), true); anchor_transform_section(app, ui, i); divider(ui);