From 432413274ee9606f7a36b381dcbbb190d0fdf0ed Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Mon, 16 Nov 2026 06:17:59 -0800 Subject: [PATCH] UI: comments describe the behavior instead of comparing it with other apps Comments in the ui-egui crate described panels, menus, dialogs, widgets and cursors by comparison with other applications ("as in ...", "...-style", "like ...'s"). They now say what VectorCraft does. The section header for raster effects in nine translation catalogs changes the same way. The change edits comments only. No code, string or catalog row changes. --- crates/ui-egui/src/canvas.rs | 4 ++-- crates/ui-egui/src/canvas/grid.rs | 2 +- crates/ui-egui/src/canvas/home.rs | 2 +- crates/ui-egui/src/canvas/view.rs | 2 +- crates/ui-egui/src/chrome.rs | 4 ++-- crates/ui-egui/src/chrome/control_bar.rs | 2 +- crates/ui-egui/src/community.rs | 4 ++-- crates/ui-egui/src/cursors.rs | 2 +- crates/ui-egui/src/dialogs/effect_gallery.rs | 6 +++--- crates/ui-egui/src/dialogs/export_for_screens.rs | 4 ++-- crates/ui-egui/src/i18n/cs.tsv | 2 +- crates/ui-egui/src/i18n/de.tsv | 2 +- crates/ui-egui/src/i18n/es.tsv | 2 +- crates/ui-egui/src/i18n/fr.tsv | 2 +- crates/ui-egui/src/i18n/it.tsv | 2 +- crates/ui-egui/src/i18n/ja.tsv | 2 +- crates/ui-egui/src/i18n/ru.tsv | 2 +- crates/ui-egui/src/i18n/zh-hans.tsv | 2 +- crates/ui-egui/src/i18n/zh-hant.tsv | 2 +- crates/ui-egui/src/lib.rs | 2 +- crates/ui-egui/src/menus.rs | 2 +- crates/ui-egui/src/menus/bar.rs | 2 +- crates/ui-egui/src/menus/submenus.rs | 6 +++--- crates/ui-egui/src/menus/tree.rs | 2 +- crates/ui-egui/src/native_menu.rs | 8 ++++---- crates/ui-egui/src/panels/appearance.rs | 2 +- crates/ui-egui/src/panels/info.rs | 2 +- crates/ui-egui/src/panels/layers/controls.rs | 2 +- crates/ui-egui/src/panels/navigator.rs | 2 +- crates/ui-egui/src/panels/properties.rs | 2 +- crates/ui-egui/src/panels/stroke.rs | 2 +- crates/ui-egui/src/place.rs | 2 +- crates/ui-egui/src/prefs_dialog.rs | 2 +- crates/ui-egui/src/scrub.rs | 2 +- crates/ui-egui/src/state.rs | 6 +++--- crates/ui-egui/src/titlebar.rs | 2 +- crates/ui-egui/src/widgets/color.rs | 2 +- crates/ui-egui/src/widgets/labels.rs | 2 +- crates/ui-egui/src/widgets/numeric.rs | 6 +++--- crates/ui-egui/src/workspaces.rs | 2 +- 40 files changed, 55 insertions(+), 55 deletions(-) diff --git a/crates/ui-egui/src/canvas.rs b/crates/ui-egui/src/canvas.rs index 847b60fd87..73cfd87cd1 100644 --- a/crates/ui-egui/src/canvas.rs +++ b/crates/ui-egui/src/canvas.rs @@ -175,7 +175,7 @@ enum Drag { }, /// A Selection tool move over a panel or toolbar: the art waits where it last moved on the /// canvas, and the panels get it ([`widgets::PanelDrag::Art`]) if it is released there. Back - /// on the canvas the move goes on, as in Illustrator (#2826). + /// on the canvas the move goes on (#2826). Art, /// Fingers making a touch gesture ([`crate::touch`]): the first one's press does nothing. Gesture, @@ -831,7 +831,7 @@ fn frame_options( // Type › Highlight Substituted Fonts: pink behind text in a substitute font. highlight_substituted_fonts: app.session.prefs.highlight_substituted_fonts, // General › Anti-aliased Artwork: off, edges are hard on screen (raster effects and - // pattern tiles stay smooth), as in Illustrator. + // pattern tiles stay smooth). anti_alias: if app.session.prefs.anti_aliased_artwork { vectorcraft_render::AntiAlias::Art } else { vectorcraft_render::AntiAlias::None }, progressive_placed: true, trace_views: true, diff --git a/crates/ui-egui/src/canvas/grid.rs b/crates/ui-egui/src/canvas/grid.rs index 84adb0d861..001b2e31f7 100644 --- a/crates/ui-egui/src/canvas/grid.rs +++ b/crates/ui-egui/src/canvas/grid.rs @@ -432,7 +432,7 @@ pub(super) fn rulers(ui: &Ui, full: egui::Rect, xf: &Xf, hover: Option, s let sy = left.top() + d; clip_left.line_segment([pos2(left.right() - len, sy), pos2(left.right(), sy)], Stroke::new(1.0, t.ruler_tick)); if let Some(text) = label { - // Vertical labels read top-to-bottom, one digit per line like Illustrator. + // Vertical labels read top-to-bottom, one digit per line. let top = sy + 2.0; if top < filled_to { return; diff --git a/crates/ui-egui/src/canvas/home.rs b/crates/ui-egui/src/canvas/home.rs index bffab8f06c..c103c4b7ea 100644 --- a/crates/ui-egui/src/canvas/home.rs +++ b/crates/ui-egui/src/canvas/home.rs @@ -25,7 +25,7 @@ pub(super) fn home(app: &mut VectorcraftApp, ui: &mut Ui, rect: egui::Rect) { /// The Home screen's column: welcome, New / Open, Recent Files, Learn, presets and community links. fn home_content(app: &mut VectorcraftApp, ui: &mut Ui) { let t = Tokens::get(ui.ctx()); - // The welcome and the New / Open buttons sit centred, as PhotoCraft's Home screen does (#4684). + // The welcome and the New / Open buttons sit centred (#4684). ui.vertical_centered(|ui| { ui.label(egui::RichText::new(tl!("Welcome to VectorCraft")).font(theme::semibold(26.0)).color(t.text)); ui.add_space(4.0); diff --git a/crates/ui-egui/src/canvas/view.rs b/crates/ui-egui/src/canvas/view.rs index 4443f12997..e0e5cc9f75 100644 --- a/crates/ui-egui/src/canvas/view.rs +++ b/crates/ui-egui/src/canvas/view.rs @@ -94,7 +94,7 @@ pub(super) const HOLD_DELAY: f32 = 0.3; /// …and how fast it zooms then (as `exp(seconds × HOLD_ZOOM)`: twice as close each second). pub(super) const HOLD_ZOOM: f64 = std::f64::consts::LN_2; -/// Performance › Animated Zoom, which needs GPU Performance as in Illustrator: the Zoom tool zooms +/// Performance › Animated Zoom, which needs GPU Performance: the Zoom tool zooms /// as it is dragged sideways or held, instead of zooming to the area dragged across, and a wheel /// notch's zoom glides in ([`wheel`]). pub(crate) fn animated_zoom(p: &vectorcraft_engine::Prefs) -> bool { diff --git a/crates/ui-egui/src/chrome.rs b/crates/ui-egui/src/chrome.rs index 7e48fc244e..9f189ddb5d 100644 --- a/crates/ui-egui/src/chrome.rs +++ b/crates/ui-egui/src/chrome.rs @@ -36,7 +36,7 @@ use tabs::{CLOSE_BEFORE_TITLE, first_tab_shown, tab_drop, tab_groups, tab_title} pub use tabs::{doc_tabs, isolation_bar, step_document}; pub(crate) use tabs::{document_window_title, show_document, window_tab}; -/// The application bar's height, in points (compact, as in PhotoCraft). +/// The application bar's height, in points (compact). pub const APP_BAR_HEIGHT: f32 = 32.0; /// The brand mark's side. const MARK: f32 = 18.0; @@ -105,7 +105,7 @@ pub fn app_bar(app: &mut VectorcraftApp, ui: &mut Ui) { let ws = ui.painter().layout_no_wrap(ws_name, egui::FontId::proportional(12.0), t.text); let ws_w = (ws.size().x + 36.0).clamp(112.0, 190.0); let gap = ui.spacing().item_spacing.x; - // The search icon, as in PhotoCraft: shown while a minimal switcher fits beside it. + // The search icon: shown while a minimal switcher fits beside it. let icon = 28.0; let search = switcher && room >= 64.0 + 8.0 + gap + icon; let ws_w = ws_w.min(room - 8.0 - gap - if search { icon } else { 0.0 }).max(64.0); diff --git a/crates/ui-egui/src/chrome/control_bar.rs b/crates/ui-egui/src/chrome/control_bar.rs index 71b737dbfc..2df5067aa9 100644 --- a/crates/ui-egui/src/chrome/control_bar.rs +++ b/crates/ui-egui/src/chrome/control_bar.rs @@ -886,7 +886,7 @@ fn gripper(app: &mut VectorcraftApp, ui: &mut Ui, t: &Tokens, bar: egui::Rect, d } } -/// The Control bar (Window → Control), context-sensitive like Illustrator's, docked to the top or +/// The Control bar (Window → Control), context-sensitive, docked to the top or /// the bottom of the window, or floating over the window below the menu bar, where it takes no room /// from the canvas. A floating bar is [`FLOAT_WIDTH`] wide, or as wide as the window when that is /// narrower, and is kept inside the window when the window shrinks. diff --git a/crates/ui-egui/src/community.rs b/crates/ui-egui/src/community.rs index 034807b8b7..97f7dffdba 100644 --- a/crates/ui-egui/src/community.rs +++ b/crates/ui-egui/src/community.rs @@ -33,7 +33,7 @@ pub fn discord_button(app: &mut VectorcraftApp, ui: &mut Ui, large: bool) -> egu let ir = egui::Rect::from_center_size(r.left_center() + vec2(h * 0.35 + icon / 2.0, 0.0), vec2(icon, icon)); if large { // The theme's accent, as the primary buttons use it, so the call to action matches the - // rest of the window (and PhotoCraft's, #4684); Discord's colour stays on the app-bar icon. + // rest of the window (#4684); Discord's colour stays on the app-bar icon. let t = Tokens::get(ui.ctx()); let fill = if resp.hovered() { t.accent } else { t.accent_strong }; ui.painter().rect_filled(r, CornerRadius::same((h / 2.0) as u8), fill); @@ -77,7 +77,7 @@ pub fn links(app: &mut VectorcraftApp, ui: &mut Ui) { links_in(app, ui, false); } -/// [`links`] for a centred column (the Home screen's, as PhotoCraft's, #4684): the Discord button +/// [`links`] for a centred column (the Home screen's, #4684): the Discord button /// and the links, each in the middle. pub fn links_centered(app: &mut VectorcraftApp, ui: &mut Ui) { links_in(app, ui, true); diff --git a/crates/ui-egui/src/cursors.rs b/crates/ui-egui/src/cursors.rs index 5495d3753c..5f04927964 100644 --- a/crates/ui-egui/src/cursors.rs +++ b/crates/ui-egui/src/cursors.rs @@ -1,5 +1,5 @@ //! Tool cursors drawn as vector glyphs (egui only offers system cursors). Black shapes with a white -//! halo, hotspot at `p`, Illustrator's visual grammar: solid arrow (Selection), hollow arrow (Direct +//! halo, hotspot at `p`, one shape per tool: solid arrow (Selection), hollow arrow (Direct //! Selection), pen nib with state badges, crosshair for drawing tools, curved arrows for rotate. //! //! The desktop app shows them as OS cursors ([`Images`]): the system moves those itself, at once, diff --git a/crates/ui-egui/src/dialogs/effect_gallery.rs b/crates/ui-egui/src/dialogs/effect_gallery.rs index fe0de205fc..6f0d0a2d35 100644 --- a/crates/ui-egui/src/dialogs/effect_gallery.rs +++ b/crates/ui-egui/src/dialogs/effect_gallery.rs @@ -1,4 +1,4 @@ -//! Effect → Effect Gallery: browse Photoshop-style raster filters by category, build a stack, and +//! Effect → Effect Gallery: browse raster filters by category, build a stack, and //! apply it as separate appearance effects in one undo step. //! //! Each filter has a thumbnail, and the dialog has its own preview, as the @@ -29,7 +29,7 @@ const PREVIEW_H: usize = 84; /// Dialog kind for the Effect Gallery. pub const KIND: &str = "effectGallery"; -/// Raster effect submenus in the gallery (the six Photoshop-style folders it holds). +/// Raster effect submenus in the gallery (the six raster filter folders it holds). const CATEGORIES: [(&str, &[&str]); 6] = [ ("Artistic", &["Effect", "Artistic"]), ("Brush Strokes", &["Effect", "Brush Strokes"]), @@ -425,7 +425,7 @@ fn sample_drawing(w: usize, h: usize) -> Vec { out } -/// Run one Photoshop-style filter on a premultiplied RGBA buffer. Leaves it unchanged when `id` +/// Run one raster filter on a premultiplied RGBA buffer. Leaves it unchanged when `id` /// is not one of those filters or the buffer is the wrong size. fn apply_pixel(id: &str, params: &Map, data: &mut [u8], w: usize, h: usize) { let Some(n) = w.checked_mul(h).and_then(|n| n.checked_mul(4)) else { return }; diff --git a/crates/ui-egui/src/dialogs/export_for_screens.rs b/crates/ui-egui/src/dialogs/export_for_screens.rs index 96b5f63c27..66087c68ea 100644 --- a/crates/ui-egui/src/dialogs/export_for_screens.rs +++ b/crates/ui-egui/src/dialogs/export_for_screens.rs @@ -1,4 +1,4 @@ -//! File → Export → Export for Screens, laid out as Illustrator's: on the left the Artboards and +//! File → Export → Export for Screens: on the left the Artboards and //! Assets tabs (thumbnails with checkboxes, in a grid or a list), Clear Selection and the prefix; //! on the right Select (All, a range or Full Document, Include Bleed, Include Artboard Fill), the destination (folder //! picker, Open Location after Export, Create Sub-folders by scale or by format; the web downloads @@ -718,7 +718,7 @@ fn tiles( ui.painter().galley(label_pos, galley, t.text); false }; - // The checkbox sits on the thumbnail's lower left corner, as Illustrator's. + // The checkbox sits on the thumbnail's lower left corner. let bx = egui::Rect::from_min_size(egui::pos2(pic.left() + 4.0, pic.bottom() - 18.0), egui::vec2(14.0, 14.0)); let mut child = ui.new_child(egui::UiBuilder::new().max_rect(bx)); if widgets::check_box(&mut child, &name, checked, true) || resp.clicked() || caption_clicked { diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index 569b1347ec..7621b992e0 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -990,7 +990,7 @@ Free Transform Volná transformace Perspective Distort Perspektivní deformace -# Photoshop-style raster effects (Effect menu, their dialogs). +# Raster effects (Effect menu, their dialogs). Radial Blur… Radiální rozostření… Blur Center Střed rozostření Smart Blur… Chytré rozostření… diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index c943c89dd2..17f2235553 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -18,7 +18,7 @@ # `untranslated_report` lists gaps) — and the status and error messages. Left in English on purpose (`MENU_KEEP_AS_IS` in the # tests): the product name, language names, OpenType, the built-in workspace names and the bracketed # perspective grid preset names; `de-DE`, `de-AT`, `de-CH` and every other `de-*` locale resolve here. -# Photoshop-style raster effects (Effect menu, their dialogs). +# Raster effects (Effect menu, their dialogs). Glowing Edges… Leuchtende Konturen… Glowing Edges Leuchtende Konturen Edge Width Kantenbreite diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index 9239c93a73..b5d43934a3 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -11,7 +11,7 @@ # Coverage: the whole interface — every menu string and every `tl!` literal (`complete_menus`, # `untranslated_report` lists gaps). Left in English on purpose (`MENU_KEEP_AS_IS` in the tests): the product name, language # names, OpenType, the built-in workspace names and the bracketed perspective grid preset names. -# Photoshop-style raster effects (Effect menu, their dialogs). +# Raster effects (Effect menu, their dialogs). Glowing Edges… Bordes resplandecientes… Glowing Edges Bordes resplandecientes Edge Width Ancho del borde diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index 1cff1c8ad0..1e2d313c3d 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -12,7 +12,7 @@ # Coverage: the whole interface — every menu string and every `tl!` literal (`complete_menus`, # `untranslated_report` lists gaps). Left in English on purpose (`MENU_KEEP_AS_IS` in the tests): the product name, language # names, OpenType, the built-in workspace names and the bracketed perspective grid preset names. -# Photoshop-style raster effects (Effect menu, their dialogs). +# Raster effects (Effect menu, their dialogs). Glowing Edges… Contour lumineux… Glowing Edges Contour lumineux Edge Width Largeur du bord diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index 08cefdbed7..a99135774d 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -11,7 +11,7 @@ # Coverage: the whole interface — every menu string and every `tl!` literal (`complete_menus`, # `untranslated_report` lists gaps). Left in English on purpose (`MENU_KEEP_AS_IS` in the tests): the product name, language # names, OpenType, the built-in workspace names and the bracketed perspective grid preset names. -# Photoshop-style raster effects (Effect menu, their dialogs). +# Raster effects (Effect menu, their dialogs). Glowing Edges… Bordi luminosi… Glowing Edges Bordi luminosi Edge Width Larghezza bordo diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index 59c7628f40..ac945b5c76 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -4406,7 +4406,7 @@ theme Appearance 外観 Free Transform 自由変形 Perspective Distort 遠近変形 -# Photoshop-style raster effects (Effect menu, their dialogs). +# Raster effects (Effect menu, their dialogs). Radial Blur… ぼかし (放射状)… Blur Center ぼかしの中心 Smart Blur… ぼかし (詳細)… diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index ae33aa0d55..6bddba8dfb 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -9,7 +9,7 @@ # Coverage: the whole interface — every menu string and every `tl!` literal (`complete_menus`, # `untranslated_report` lists gaps). Left in English on purpose (`MENU_KEEP_AS_IS` in the tests): the product name, language # names, OpenType, the built-in workspace names and the bracketed perspective grid preset names. -# Photoshop-style raster effects (Effect menu, their dialogs). +# Raster effects (Effect menu, their dialogs). Glowing Edges… Светящиеся края… Glowing Edges Светящиеся края Edge Width Ширина края diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index 5f612cb0d4..55a52d2884 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -5773,7 +5773,7 @@ axis Both 两者 Constrain 约束 Perspective Distort 透视扭曲 -# Photoshop-style raster effects (Effect menu, their dialogs). +# Raster effects (Effect menu, their dialogs). Radial Blur… 径向模糊… Blur Center 模糊中心 Smart Blur… 智能模糊… diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index e0b5a13ee2..7cd517065b 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -5604,7 +5604,7 @@ axis Both 兩者 Free Transform 任意變形 Perspective Distort 透視扭曲 -# Photoshop-style raster effects (Effect menu, their dialogs). +# Raster effects (Effect menu, their dialogs). Radial Blur… 放射狀模糊… Blur Center 模糊中心 Smart Blur… 智慧型模糊… diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs index 0b8ee67183..b1598cdb12 100644 --- a/crates/ui-egui/src/lib.rs +++ b/crates/ui-egui/src/lib.rs @@ -1,4 +1,4 @@ -//! VectorCraft's egui frontend: an Illustrator-style UI over `vectorcraft-engine`. +//! VectorCraft's egui frontend: menus, tools, panels and dialogs over `vectorcraft-engine`. //! //! The UI is thin: every action goes through [`VectorcraftApp::run`], which dispatches UI commands //! (view/window) here and everything else to the engine. The same entry point serves menus, diff --git a/crates/ui-egui/src/menus.rs b/crates/ui-egui/src/menus.rs index 4e2d80bb45..b58505590a 100644 --- a/crates/ui-egui/src/menus.rs +++ b/crates/ui-egui/src/menus.rs @@ -1,4 +1,4 @@ -//! The menu bar (Illustrator's menu tree) and UI-level commands. +//! The menu bar (the full menu tree) and UI-level commands. //! //! Items bound to a command id run through [`VectorcraftApp::run`]. Items not implemented yet are //! listed (disabled, with their shortcut) so the full surface is visible and discoverable; the diff --git a/crates/ui-egui/src/menus/bar.rs b/crates/ui-egui/src/menus/bar.rs index 85588620e8..5e2f6aa172 100644 --- a/crates/ui-egui/src/menus/bar.rs +++ b/crates/ui-egui/src/menus/bar.rs @@ -25,7 +25,7 @@ pub fn menu_bar(app: &mut VectorcraftApp, ui: &mut egui::Ui) -> f32 { let mut clicked: Option<(String, Value)> = None; let mut file_open = false; let tree = menu_tree_named(app.session.prefs.font_names_in_english); - // No application menu in the window (as in Illustrator): the bar starts at File on every + // No application menu in the window: the bar starts at File on every // platform. The VectorCraft menu stays in the tree: the native Mac bar takes it from there. let tree: Vec<(&str, Vec)> = tree.into_iter().filter(|(title, _)| *title != "VectorCraft").collect(); // A menu bar for its layout and menu-button style, but the titles use `Popup::menu` directly: diff --git a/crates/ui-egui/src/menus/submenus.rs b/crates/ui-egui/src/menus/submenus.rs index 469c40e7c7..1f8facea4c 100644 --- a/crates/ui-egui/src/menus/submenus.rs +++ b/crates/ui-egui/src/menus/submenus.rs @@ -111,7 +111,7 @@ pub(super) fn font_items(english_names: bool) -> Vec { /// The catalogue's menu path of the effects in 3D and Materials › 3D (Classic). const CLASSIC_3D: &[&str] = &["Effect", "3D and Materials", "3D (Classic)"]; -/// The raster effects' submenus of the Effect menu (the Photoshop-style effects, below the +/// The raster effects' submenus of the Effect menu (the pixel effects, below the /// vector effects): (submenu, the catalogue's menu path of its effects). /// The raster Stylize submenu shares its path with the vector one and lists only the effects at /// that path that [`vectorcraft_effects::PIXEL_EFFECTS`] names. @@ -157,13 +157,13 @@ pub(super) fn effect_menu() -> Vec { "Warp", ]; let top_level = |e: &vectorcraft_effects::EffectInfo| e.menu == ["Effect"] && order.contains(&e.label); - // An effect goes in the vector submenu its path names unless it is a Photoshop-style effect, + // An effect goes in the vector submenu its path names unless it is a pixel effect, // which goes in the raster submenu of the same name when `RASTER_MENUS` has one (Stylize › // Glowing Edges). let in_vector_menu = |e: &vectorcraft_effects::EffectInfo| order.iter().any(|s| e.menu == ["Effect", *s]) && !vectorcraft_effects::PIXEL_EFFECTS.contains(&e.id); let item = |e: &vectorcraft_effects::EffectInfo| match e.defaults.as_object().is_some_and(|o| o.is_empty()) { - // No options (Effect → Pathfinder, Crop Marks): apply directly, like Illustrator. + // No options (Effect → Pathfinder, Crop Marks): apply directly. true => Item::Cmd(e.label, "effect.apply", json!({ "effect": e.id })), false => Item::Cmd(e.label, "effect.dialog", json!({ "effect": e.id })), }; diff --git a/crates/ui-egui/src/menus/tree.rs b/crates/ui-egui/src/menus/tree.rs index ec8ec99018..5e1b291eeb 100644 --- a/crates/ui-egui/src/menus/tree.rs +++ b/crates/ui-egui/src/menus/tree.rs @@ -15,7 +15,7 @@ pub fn menu_tree_named(english_names: bool) -> Vec<(&'static str, Vec)> { vec![ ( // The application menu: About and Discord only. The in-window bar never shows it (File - // is first there, as in Illustrator); on macOS `native_menu::mac_layout` composes the + // is first there); on macOS `native_menu::mac_layout` composes the // App menu from this entry and the other menus (About from Help, Settings from Edit, // Quit from File, Language and Appearance synthesized). It stays first: `from_tree` // gives the first menu the App role. diff --git a/crates/ui-egui/src/native_menu.rs b/crates/ui-egui/src/native_menu.rs index 510131be0e..5f133a6686 100644 --- a/crates/ui-egui/src/native_menu.rs +++ b/crates/ui-egui/src/native_menu.rs @@ -3,12 +3,12 @@ //! [`Backend`] (the desktop app's, through muda). //! //! Pure and platform-free, so it is tested everywhere and builds for the web; only the backend -//! touches AppKit. What the layout does ([`mac_layout`], Illustrator on the Mac as the reference): +//! touches AppKit. What the layout does ([`mac_layout`]): //! - an **app menu** named VectorCraft: About; Settings, a submenu with one item per Preferences //! page (General… ⌘K first); Language; Appearance (the UI brightness); Services; Hide VectorCraft //! ⌃⌘H (⌘H stays View › Hide Edges), Hide Others ⌥⌘H, Show All; and Quit ⌘Q, still the app's own //! `app.quit`, so documents with unsaved changes are asked about. Language and Appearance have -//! no in-window menu (as in PhotoCraft) and are synthesized here; Quit is File › Exit in the +//! no in-window menu and are synthesized here; Quit is File › Exit in the //! window and reads as Quit in the App menu. These leave the other menus (Edit › Preferences…, //! Help › About), and Join Our Discord stays under Help only; //! - **Window** gets Minimize ⌃⌘M, Zoom and Bring All to Front, and **Help** the system's search @@ -299,7 +299,7 @@ pub struct Layout { } /// The Mac menu bar of `bar` (the in-window menus, [`from_tree`]): see the module docs. -/// Language and Appearance have no in-window menu (as in PhotoCraft); when the tree doesn't +/// Language and Appearance have no in-window menu; when the tree doesn't /// carry them they are synthesized below, so the App menu keeps them. pub fn mac_layout(app: &VectorcraftApp, bar: &MenuBar, lang: Lang) -> Layout { let mut bar = bar.clone(); @@ -400,7 +400,7 @@ fn native_item(app: &VectorcraftApp, label: &'static str, command: &'static str, } /// Settings ▸: one item per page of the Preferences dialog (its own list), each opening it there; -/// the first (General…) has Preferences' shortcut (⌘K), as in Illustrator. +/// the first (General…) has Preferences' shortcut (⌘K). fn settings_pages(preferences: &Item, lang: Lang) -> Vec { vectorcraft_engine::cmd::prefscmds::PREF_CATEGORIES .iter() diff --git a/crates/ui-egui/src/panels/appearance.rs b/crates/ui-egui/src/panels/appearance.rs index 308b8f3602..cb6f72ac71 100644 --- a/crates/ui-egui/src/panels/appearance.rs +++ b/crates/ui-egui/src/panels/appearance.rs @@ -519,7 +519,7 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) { Some(n) => stack(app, ui, n, sel, r, None), None => default_stack(app, ui), } - // Spacer row like Illustrator's empty tail. + // An empty spacer row at the end of the list. ui.allocate_exact_size(vec2(ui.available_width(), 10.0), Sense::hover()); }); bottom(app, ui, node.as_ref(), sel); diff --git a/crates/ui-egui/src/panels/info.rs b/crates/ui-egui/src/panels/info.rs index 2e81441654..19fe505c0c 100644 --- a/crates/ui-egui/src/panels/info.rs +++ b/crates/ui-egui/src/panels/info.rs @@ -14,7 +14,7 @@ use crate::VectorcraftApp; use crate::theme::Tokens; use crate::widgets::{self, menu_item}; -/// Colour values in the colour's own model, like Illustrator's Info panel. +/// Color values in the color's own model, for the Info panel. pub fn color_values(c: &Color) -> Vec<(&'static str, String)> { match *c { Color::Rgb { r, g, b } => vec![("R", format!("{:.0}", r * 255.0)), ("G", format!("{:.0}", g * 255.0)), ("B", format!("{:.0}", b * 255.0))], diff --git a/crates/ui-egui/src/panels/layers/controls.rs b/crates/ui-egui/src/panels/layers/controls.rs index 381d0a65b1..9bb6ed8f22 100644 --- a/crates/ui-egui/src/panels/layers/controls.rs +++ b/crates/ui-egui/src/panels/layers/controls.rs @@ -82,7 +82,7 @@ pub(super) fn bottom_bar(app: &mut VectorcraftApp, ui: &mut Ui, view: &View, doc actions.push(("layer.new".into(), json!({"top": m.command}))); } } - // Rows dropped on the trash are deleted, on New Layer duplicated, as in Illustrator. Both are + // Rows dropped on the trash are deleted, on New Layer duplicated. Both are // outlined while rows (or, on the trash, a target circle) hang over them. Guide rows dropped on // the trash delete their guides (`guide.remove`); New Layer does not take them. for (button, cmd) in [(&trash, "ui.layerDelete"), (&new_layer, "layer.duplicate")] { diff --git a/crates/ui-egui/src/panels/navigator.rs b/crates/ui-egui/src/panels/navigator.rs index 60eb4c18d0..d6a9763b20 100644 --- a/crates/ui-egui/src/panels/navigator.rs +++ b/crates/ui-egui/src/panels/navigator.rs @@ -282,7 +282,7 @@ fn view_box(region: DRect, thumb: Rect, canvas: Rect, v: &crate::state::View, ui pts } -/// Slider position (0..1) ↔ zoom percent on Illustrator's log range 3.13 %–64 000 %. +/// Slider position (0..1) ↔ zoom percent on a log range, 3.13 %–64 000 %. pub fn zoom_to_slider(z: f64) -> f64 { ((z.clamp(3.13, 64000.0)).ln() - 3.13f64.ln()) / (64000f64.ln() - 3.13f64.ln()) } diff --git a/crates/ui-egui/src/panels/properties.rs b/crates/ui-egui/src/panels/properties.rs index 500b967469..27cbf67b49 100644 --- a/crates/ui-egui/src/panels/properties.rs +++ b/crates/ui-egui/src/panels/properties.rs @@ -1,4 +1,4 @@ -//! The Properties panel: context-sensitive sections like Illustrator's. +//! The Properties panel: sections that change with the selection. use egui::Ui; use serde_json::json; diff --git a/crates/ui-egui/src/panels/stroke.rs b/crates/ui-egui/src/panels/stroke.rs index c667f01200..3b48f45e91 100644 --- a/crates/ui-egui/src/panels/stroke.rs +++ b/crates/ui-egui/src/panels/stroke.rs @@ -76,7 +76,7 @@ fn dash_state(dash: Option<&Dash>, last: Option<(Vec, bool)>) -> (Vec, } /// Six dash/gap fields → a dash pattern: stops at the first empty dash; a dash without a gap -/// repeats its length as the gap (Illustrator's behaviour). +/// repeats its length as the gap. pub fn dash_pattern(fields: &[Option; 6]) -> Vec { edited_dash_pattern(fields, &[]) } diff --git a/crates/ui-egui/src/place.rs b/crates/ui-egui/src/place.rs index 6485cafd8c..02195e18ea 100644 --- a/crates/ui-egui/src/place.rs +++ b/crates/ui-egui/src/place.rs @@ -631,7 +631,7 @@ pub fn paint_cursor(app: &mut VectorcraftApp, ctx: &egui::Context, painter: &egu // ---------- drops ---------- impl VectorcraftApp { - /// Where file `name` dropped with the pointer at `pos` (screen points) goes: as in Illustrator, + /// Where file `name` dropped with the pointer at `pos` (screen points) goes: /// onto the canvas of the open document (Shift embeds it), else opened. Where the platform /// doesn't say (`None`: desktop drags carry no position), a document opens as a tab of its /// own and a picture or text is placed in the middle of the view. A library, a presets file, a diff --git a/crates/ui-egui/src/prefs_dialog.rs b/crates/ui-egui/src/prefs_dialog.rs index e8a6368cbb..7b69bdf72c 100644 --- a/crates/ui-egui/src/prefs_dialog.rs +++ b/crates/ui-egui/src/prefs_dialog.rs @@ -1,4 +1,4 @@ -//! Edit → Preferences (⌘K): Illustrator-style category list + fields, rendered from the engine's +//! Edit → Preferences (⌘K): a category list + its fields, rendered from the engine's //! preference table ([`PREF_SPECS`]). The dialog edits a working copy in `Dialog::fields` //! (one field per preference key, so agents can `ui.dialog.set` any of them) and OK applies it //! through `prefs.set`. Also: persistence of engine prefs inside `UiState` and the per-frame diff --git a/crates/ui-egui/src/scrub.rs b/crates/ui-egui/src/scrub.rs index 5a0a2ff4f9..a68759087f 100644 --- a/crates/ui-egui/src/scrub.rs +++ b/crates/ui-egui/src/scrub.rs @@ -1,4 +1,4 @@ -//! Scrubbing numeric fields (#400, beyond Illustrator; Photoshop's scrubby labels): a horizontal +//! Scrubbing numeric fields (#400): a horizontal //! drag on a numeric field's label (`W:`, `Opacity:`, the Character panel's size icon) steps the //! field's value by one unit every [`PX_PER_STEP`] points, ten with Shift and a tenth with //! Ctrl/Cmd, as the arrow keys step a focused field; a click on the label focuses the field. A diff --git a/crates/ui-egui/src/state.rs b/crates/ui-egui/src/state.rs index d3698aaeef..de85047376 100644 --- a/crates/ui-egui/src/state.rs +++ b/crates/ui-egui/src/state.rs @@ -101,7 +101,7 @@ pub fn sync_zoom_stops_display_print_size(v: bool) { ZOOM_STOPS_PRINT_SIZE.store(v, Ordering::Relaxed); } -/// Illustrator's preset zoom stops, in percent. +/// The preset zoom stops, in percent. pub const ZOOM_STOPS: [f64; 26] = [ 3.13, 4.17, 6.25, 8.33, 12.5, 16.67, 25.0, 33.33, 50.0, 66.67, 100.0, 150.0, 200.0, 300.0, 400.0, 600.0, 800.0, 1200.0, 1600.0, 2400.0, 3200.0, 4800.0, 6400.0, 12800.0, 25600.0, 64000.0, @@ -135,7 +135,7 @@ pub fn next_zoom_with_display(z: f64, up: bool, display_print_size: bool) -> f64 zoom_from_display_percent(stop, display_print_size) } -/// Format like Illustrator's tab/zoom field: up to 2 decimals, no trailing zeros. +/// Format for the tab/zoom field: up to 2 decimals, no trailing zeros. pub fn zoom_label(z: f64, display_print_size: bool) -> String { let s = format!("{:.2}", zoom_display_percent(z, display_print_size)); let s = s.trim_end_matches('0').trim_end_matches('.'); @@ -454,7 +454,7 @@ pub struct UiState { pub toolbar_advanced: bool, #[serde(default = "yes")] pub task_bar: bool, - /// Where the Contextual Task Bar was dragged or pinned. Not saved, as in Illustrator: the bar + /// Where the Contextual Task Bar was dragged or pinned. Not saved: the bar /// starts under the selection at every launch. #[serde(skip)] pub task_bar_place: TaskBarPlace, diff --git a/crates/ui-egui/src/titlebar.rs b/crates/ui-egui/src/titlebar.rs index cbbd216e75..3a18dce216 100644 --- a/crates/ui-egui/src/titlebar.rs +++ b/crates/ui-egui/src/titlebar.rs @@ -326,7 +326,7 @@ mod tests { let texts: Vec = texts(&out).into_iter().map(|(t, _)| t).collect(); let has = |s: &str| texts.iter().any(|t| t == s); assert_eq!(has("Discord"), width > 1000.0, "{width}: {texts:?}"); - // Search is an icon only (as in PhotoCraft): its label lives in the tooltip. + // Search is an icon only: its label lives in the tooltip. assert!(!has("Search commands and tools"), "{width}: {texts:?}"); } } diff --git a/crates/ui-egui/src/widgets/color.rs b/crates/ui-egui/src/widgets/color.rs index 04aae5be55..84f847a14f 100644 --- a/crates/ui-egui/src/widgets/color.rs +++ b/crates/ui-egui/src/widgets/color.rs @@ -12,7 +12,7 @@ pub enum Live { } /// A colour slider with a gradient track (`track(t)` gives the colour at 0..1) and a triangular -/// thumb below it, like Illustrator's Color panel. Returns the new normalized value and the phase. +/// thumb below it, as in the Color panel. Returns the new normalized value and the phase. pub fn color_slider(ui: &mut Ui, id: impl std::hash::Hash, value: f32, width: f32, track: &dyn Fn(f32) -> Color32) -> (Option, Live) { color_slider_named(ui, id, "", value, width, track) } diff --git a/crates/ui-egui/src/widgets/labels.rs b/crates/ui-egui/src/widgets/labels.rs index 103f53ab65..526556d65b 100644 --- a/crates/ui-egui/src/widgets/labels.rs +++ b/crates/ui-egui/src/widgets/labels.rs @@ -175,7 +175,7 @@ pub fn subheader(ui: &mut Ui, text: &str) { ui.label(egui::RichText::new(tl!(text)).size(12.5).color(t.text)); } -/// A label drawn with a dotted underline (Illustrator's link labels: "Stroke:", "Opacity:"). +/// A label drawn with a dotted underline (the panels' link labels: "Stroke:", "Opacity:"). pub fn link_label(ui: &mut Ui, text: &str) -> Response { let t = Tokens::get(ui.ctx()); let galley = ui.painter().layout_no_wrap(tl!(text).to_string(), egui::FontId::proportional(12.5), t.text_strong); diff --git a/crates/ui-egui/src/widgets/numeric.rs b/crates/ui-egui/src/widgets/numeric.rs index 89ce8d70d5..d2ea34213e 100644 --- a/crates/ui-egui/src/widgets/numeric.rs +++ b/crates/ui-egui/src/widgets/numeric.rs @@ -293,8 +293,8 @@ pub(super) fn shown_alike(show: impl Fn(f64) -> String) -> impl Fn(f64, f64) -> /// goes to the next whole number in its direction (5.1 up to 6, down to 5), a Ctrl/Cmd step goes to /// the next tenth, and a Shift step adds or takes ten. Steps stop at the field's `bounds` (#3370: /// a weight stops at 0, a miter limit at 1), and a plain step also stops at each of `stops` -/// ([`step_through`]). The new value is applied at once, as in -/// Illustrator's panels and dialogs, and the new text replaces `buf`, all selected so typing +/// ([`step_through`]). The new value is applied at once, and +/// the new text replaces `buf`, all selected so typing /// replaces it when focused. Returns the new number when a step was taken. An enabled field takes /// the wheel without taking keyboard focus, and the panel under it doesn't scroll, when the wheel /// stream began over the field and the pointer was moved onto it, or pressed on it, after the @@ -745,7 +745,7 @@ impl egui::Plugin for WheelTailPlugin { /// A [`num_field`] for a width or height (Transform panel, Properties panel, Control bar): Ctrl/Cmd+Enter /// also commits it and ends its editing, as Enter does, and [`enter_modifiers`] reports Command. A -/// percentage typed alone (`50%`) is that share of the size shown, as in Illustrator (#2401). +/// percentage typed alone (`50%`) is that share of the size shown (#2401). pub fn size_field(ui: &mut Ui, id: impl std::hash::Hash, value: Option, unit: Unit, width: f32) -> Option { size_field_named(ui, id, None, value, unit, width) } diff --git a/crates/ui-egui/src/workspaces.rs b/crates/ui-egui/src/workspaces.rs index 2a764a6968..886589b5f0 100644 --- a/crates/ui-egui/src/workspaces.rs +++ b/crates/ui-egui/src/workspaces.rs @@ -94,7 +94,7 @@ pub const ESSENTIALS: &str = "Essentials"; /// Touch workspace (Window → Workspace → Touch; Preferences › Devices › Enable Touch Workspace). pub const TOUCH: &str = "Touch"; -/// Built-in workspaces, in Illustrator's menu order (Essentials first). +/// Built-in workspaces, in menu order (Essentials first). pub fn builtins() -> Vec { let base = Workspace::default(); let w = |name: &str, f: &dyn Fn(&mut Workspace)| {