diff --git a/crates/ui-egui/src/canvas/input.rs b/crates/ui-egui/src/canvas/input.rs index d47d7fe502..18ef086ebf 100644 --- a/crates/ui-egui/src/canvas/input.rs +++ b/crates/ui-egui/src/canvas/input.rs @@ -5,8 +5,8 @@ use super::drag::{ tool_drag_moved, tool_frame_moves, tool_holds, tool_press_doc_id, }; use super::view::{ - HOLD_DELAY, HOLD_ZOOM, SCRUB_SLOP, SCRUB_ZOOM, WheelTurn, animated_zoom, edge_scroll, pan_pixels, pan_ppp, rotate_about, scroll_view, - touch_gestures, trackpad_turn, wheel, whole_pixels, zoom_about, + HOLD_DELAY, HOLD_ZOOM, SCRUB_SLOP, SCRUB_ZOOM, WheelTurn, animated_zoom, edge_scroll, edge_scroll_pixels, pan_pixels, pan_ppp, rotate_about, + scroll_view, touch_gestures, trackpad_turn, wheel, whole_pixels, zoom_about, }; use super::{Color32, Drag, Mods, Point, PointerEvent, PointerKind, Pos2, Shape, Stroke, Ui, VectorcraftApp, View, Xf, json}; @@ -357,6 +357,8 @@ fn begin_drag(app: &mut VectorcraftApp, ui: &Ui, f: &Pointing, p: Pos2) { // A new press has not dragged yet, whatever an interrupted one left behind. dd.remove::(tool_drag_doc_id()); dd.insert_temp(tool_press_doc_id(), xf.to_doc(p)); + // Edge scrolling waits for the pointer to move away from the press ([`edge_scroll_held`]). + dd.insert_temp(edge_scroll_id(), EdgeScroll { press: p, armed: false, rest: (0.0, 0.0) }); // Space held at the press (Cmd+Space lends the Zoom tool) sizes the marquee until // it is let go ([`zoom_marquee_start`]). if matches!(d, Drag::ZoomBox { .. }) { @@ -469,24 +471,54 @@ fn drag_held(app: &mut VectorcraftApp, ui: &Ui, f: &Pointing, d: Drag, p: Pos2) } } +/// How far the pointer moves on screen from the press, in points, before a held tool drag +/// scrolls the view at an edge of the canvas ([`edge_scroll_held`]). +const EDGE_SCROLL_SLOP: f32 = 3.0; + +/// A tool press's edge scrolling ([`edge_scroll_held`]), set when the press begins: where on screen +/// it was pressed, whether the pointer has since moved away from there, and the part of a device +/// pixel the scrolls of this press have left along each axis. Its own remainder, so the scrolls of +/// one press neither take nor leave part of a wheel scroll's. +#[derive(Clone, Copy, Debug, PartialEq)] +struct EdgeScroll { + press: Pos2, + armed: bool, + rest: (f64, f64), +} + +fn edge_scroll_id() -> egui::Id { + egui::Id::unique("canvas-edge-scroll") +} + /// Scroll the view for a tool drag held at `p` near an edge of the canvas ([`edge_scroll`]), and -/// return the canvas's transform after it; `None` when the view did not move. Only once the press -/// has dragged (a click near the edge stays a click), with the pointer over the canvas itself (over -/// a panel the Selection tools hand the art to the panels), and not under a modal dialog. +/// return the canvas's transform after it; `None` when the view did not move. Only once the pointer +/// has moved [`EDGE_SCROLL_SLOP`] from the press on screen (a click near the edge stays a click, and +/// a view scrolled by the wheel under a still press is not a drag), with the pointer over the +/// canvas itself (over a panel the Selection tools hand the art to the panels), and not under a +/// modal dialog. The view moves by whole device pixels; the part of a pixel left over waits for the +/// next frame on an axis that scrolls on, and stays as it is on one that does not. fn edge_scroll_held(app: &mut VectorcraftApp, ui: &Ui, f: &Pointing, p: Pos2) -> Option { - let dragged = ui.data(|d| d.get_temp::(tool_drag_doc_id()).is_some()); - if !dragged || f.modal || !ui.input(|i| i.pointer.has_pointer()) || !on_canvas(ui, f.resp, p) { + let mut st = ui.data(|d| d.get_temp::(edge_scroll_id()))?; + if !st.armed && (p - st.press).length() >= EDGE_SCROLL_SLOP { + st.armed = true; + ui.data_mut(|d| d.insert_temp(edge_scroll_id(), st)); + } + if !st.armed || f.modal || !ui.input(|i| i.pointer.has_pointer()) || !on_canvas(ui, f.resp, p) { return None; } let by = edge_scroll(f.rect, p, ui.input(|i| i.unstable_dt))?; - let before = app.view().map(|v| v.center); - scroll_view(app, ui, by); - let v = *app.view()?; - // Less than half a pixel is kept for the next frame: the view has not moved yet. - if before == Some(v.center) { + let ppp = pan_ppp(app, ui); + let ui_zoom = app.canvas_ui_zoom; + let ((dx, dy), rest) = edge_scroll_pixels(st.rest, by, ppp); + st.rest = rest; + ui.data_mut(|d| d.insert_temp(edge_scroll_id(), st)); + if dx == 0.0 && dy == 0.0 { return None; } - Some(Xf::at(f.rect, &v, app.canvas_ui_zoom)) + let vm = app.view_mut()?; + pan_pixels(vm, (ppp, ui_zoom), (dx, dy)); + let v = *vm; + Some(Xf::at(f.rect, &v, ui_zoom)) } /// A drag for each of this frame's moves before the pointer's position ([`tool_frame_moves`]), each diff --git a/crates/ui-egui/src/canvas/tests_edge_scroll.rs b/crates/ui-egui/src/canvas/tests_edge_scroll.rs index 10891ea352..d217130e60 100644 --- a/crates/ui-egui/src/canvas/tests_edge_scroll.rs +++ b/crates/ui-egui/src/canvas/tests_edge_scroll.rs @@ -2,7 +2,7 @@ //! shows (#8551): a Selection tool move carries the art along, a drawing tool's shape grows, and //! the view stops once the pointer leaves the edge. A click near the edge scrolls nothing. -use super::view::{EDGE_SCROLL_SPEED, EDGE_SCROLL_ZONE, edge_scroll}; +use super::view::{EDGE_SCROLL_SPEED, EDGE_SCROLL_ZONE, edge_scroll, edge_scroll_pixels}; use super::*; use vectorcraft_engine::Session; @@ -57,11 +57,36 @@ fn edge_scroll_moves_the_content_away_from_the_edge_the_pointer_is_near() { assert!(edge_scroll(r, pos2(r.left() + 1.0, r.center().y), dt).unwrap().x > 0.0); let corner = edge_scroll(r, pos2(r.left() + 1.0, r.top() + 1.0), dt).unwrap(); assert!(corner.x > 0.0 && corner.y > 0.0, "{corner:?}"); + // In a corner both ways, but no faster than at one edge. + let corner = edge_scroll(r, pos2(r.right() - 1.0, r.bottom() - 1.0), dt).unwrap(); + assert!(corner.x < 0.0 && corner.y < 0.0 && corner.length() <= full + 1e-3, "{corner:?}"); assert!(edge_scroll(r, pos2(r.center().x, r.bottom() - 1.0), dt).unwrap().y < 0.0); // A stalled frame scrolls a tenth of a second's worth at most. assert_eq!(edge_scroll(r, pos2(r.right(), r.center().y), 5.0), Some(right)); } +/// The view moves by whole device pixels, keeping the rest for the press's next scroll; an axis +/// the scroll does not move keeps its remainder untouched rather than rounding it each frame. +#[test] +fn edge_scroll_pixels_keep_the_remainder_of_an_axis_that_does_not_scroll() { + // 10.5 pixels: 11 now (rounded away from zero), half a pixel back owed. + let (d, rest) = edge_scroll_pixels((0.0, 0.0), vec2(-10.5, 0.0), 1.0); + assert_eq!(d, (-11.0, 0.0)); + assert_eq!(rest, (0.5, 0.0)); + // Along the top edge only: x keeps its half pixel, frame after frame, and does not move. + let mut rest = rest; + for _ in 0..4 { + let (d, r) = edge_scroll_pixels(rest, vec2(0.0, 7.0), 1.0); + assert_eq!(d, (0.0, 7.0)); + assert_eq!(r.0, 0.5, "x keeps its remainder"); + rest = r; + } + // Scrolling that way again, it counts: 0.5 + 1.5 = 2 pixels. + assert_eq!(edge_scroll_pixels(rest, vec2(1.5, 0.0), 1.0).0, (2.0, 0.0)); + // At 2 device pixels a point. + assert_eq!(edge_scroll_pixels((0.0, 0.0), vec2(0.25, -1.0), 2.0), ((1.0, -2.0), (-0.5, 0.0))); +} + /// The issue's case: zoomed in, a selected object dragged towards the panels on the right reaches /// the canvas's edge. Held there, the view scrolls right and the object goes on with the pointer; /// back away from the edge, the view stops. @@ -118,8 +143,22 @@ fn a_rectangle_drag_held_near_the_bottom_edge_keeps_growing() { let edge = pos2(start.x + 10.0, rect.bottom() - 2.0); frame(&mut app, &ctx, vec![egui::Event::PointerMoved(edge)]); let c0 = center(&app); + // The bottom of the rectangle drawn so far: the preview in the document. + let preview_bottom = |app: &VectorcraftApp| { + let st = app.session.active().unwrap(); + let mut bottom = f64::MIN; + st.doc.walk(|n| { + if let Some(b) = n.geometric_bounds() { + bottom = bottom.max(b.y1); + } + }); + bottom + }; for _ in 0..4 { frame(&mut app, &ctx, vec![]); + // Each held frame the preview reaches the pointer in the view as it is now. + let now = Xf::new(rect, app.view().unwrap()).to_doc(edge).y; + assert!((preview_bottom(&app) - now).abs() < 0.5, "the preview follows the pointer: {} vs {now}", preview_bottom(&app)); } let c1 = center(&app); assert!(c1.y > c0.y && (c1.x - c0.x).abs() < 1e-9, "the view scrolls down: {c0:?} then {c1:?}"); @@ -163,3 +202,30 @@ fn a_hand_drag_held_near_the_edge_does_not_scroll_on() { assert_eq!(center(&app), c0); frame(&mut app, &ctx, vec![button(edge, false)]); } + +/// A press held still near the edge while the wheel scrolls the view is not a drag: the pointer +/// has not moved on screen, so the view does not go on scrolling after the wheel stops. +#[test] +fn a_wheel_scroll_under_a_still_press_near_the_edge_does_not_start_edge_scrolling() { + let (mut app, ctx, _) = zoomed_in("selection"); + let rect = app.canvas_rect.unwrap(); + let at = pos2(rect.right() - 4.0, rect.center().y); + frame(&mut app, &ctx, vec![egui::Event::PointerMoved(at), button(at, true)]); + let wheel = egui::Event::MouseWheel { + unit: egui::MouseWheelUnit::Point, + delta: vec2(0.0, 40.0), + phase: egui::TouchPhase::Move, + modifiers: Default::default(), + source: egui::MouseWheelSource::Unknown, + }; + let c0 = center(&app); + frame(&mut app, &ctx, vec![wheel]); + let wheeled = center(&app); + assert_ne!(wheeled, c0, "the wheel scrolls the view"); + for _ in 0..4 { + frame(&mut app, &ctx, vec![]); + } + // The wheel's own scroll eases out along y over these frames; the right edge would scroll x. + assert_eq!(center(&app).x, wheeled.x, "no edge scrolling"); + frame(&mut app, &ctx, vec![button(at, false)]); +} diff --git a/crates/ui-egui/src/canvas/view.rs b/crates/ui-egui/src/canvas/view.rs index b8a6a6df6f..b2669b128d 100644 --- a/crates/ui-egui/src/canvas/view.rs +++ b/crates/ui-egui/src/canvas/view.rs @@ -137,7 +137,7 @@ pub(super) const EDGE_SCROLL_SPEED: f32 = 900.0; /// seconds (#8551), as the screen points the content moves: away from that edge, so what lies /// past it comes into view, faster the nearer the pointer is to the edge. `None` with the pointer /// outside the canvas or away from its edges, or with no time passed. A stalled frame counts a -/// tenth of a second at most. +/// tenth of a second at most, and in a corner the content moves no faster than near one edge. pub(super) fn edge_scroll(rect: egui::Rect, p: Pos2, dt: f32) -> Option { if !rect.contains(p) || !p.x.is_finite() || !p.y.is_finite() || !dt.is_finite() || dt <= 0.0 { return None; @@ -163,7 +163,27 @@ pub(super) fn edge_scroll(rect: egui::Rect, p: Pos2, dt: f32) -> Option 1.0 { v / v.length() } else { v }; + Some(v * (EDGE_SCROLL_SPEED * dt.min(0.1))) +} + +/// An edge scroll of `by` screen points ([`edge_scroll`]) at `ppp` device pixels a point, after the +/// scrolls of the same press left `rest` device pixels along each axis: the whole device pixels to +/// move the content by, and what is left. An axis this scroll does not move keeps its remainder as +/// it is: rounding a half pixel there would move the view one pixel back and forth each frame. +pub(super) fn edge_scroll_pixels(rest: (f64, f64), by: egui::Vec2, ppp: f32) -> ((f64, f64), (f64, f64)) { + let step = |rest: f64, by: f32| { + if by == 0.0 { + return (0.0, rest); + } + let total = rest + f64::from(by) * f64::from(ppp); + let whole = total.round(); + (whole, total - whole) + }; + let ((dx, rx), (dy, ry)) = (step(rest.0, by.x), step(rest.1, by.y)); + ((dx, dy), (rx, ry)) } /// Move view `vm`'s content by `(dx, dy)` device pixels along the screen's axes, at `ppp` device diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index e4b77d63b6..787ce412e3 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -1019,7 +1019,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur - In the Layers panel only the primary mouse button drags. A drag with the right or middle button on a row, a guide row, the selection square, the eye or lock column or a target circle moves, copies, hides, locks and transfers nothing and records no undo step, and a right-click still opens the row's menu (`panels::layers` test `only_the_primary_button_drags_rows_guides_art_columns_and_appearances`). - Rows or the selection square dragged over the Layers panel's list show the copy cursor while Alt is held, as the drop then copies, and the grabbing hand otherwise; the cursor follows Alt pressed or released mid-drag. The copy cursor is the panels' add cursor (#8241): on Windows and X11, which have no system copy cursor winit can show, the white arrow with a plus. Over the trash and New Layer, which delete or duplicate with or without Alt, the hand stays, and guide rows keep their own cursor (#8217; `panels::layers` tests `alt_shows_the_copy_cursor_while_rows_are_dragged` and `drag_cursor_shows_a_copy_only_where_the_drop_copies`). - An Alt-drag in the Layers panel copies rows above or below one of their own rows (`layer.move` with `copy` and that row as the target), and the bottom layer Alt-dragged into the empty space under the list is copied below itself. So the top layer dragged up, the bottom layer dragged down and a document's only layer are copied, as any other row is. A move onto its own place, and a copy inside itself, still change nothing (#8237; `panels::layers` tests `alt_dragging_the_top_layer_up_or_the_bottom_layer_down_copies_it` and `a_lone_layer_alt_dragged_up_or_down_is_copied`; engine test `a_copy_goes_above_or_below_a_row_it_copies`). - - A tool drag held within 24 points of an edge of the canvas scrolls the view away from that edge (#8551), faster nearer it (up to 900 points a second at the edge, a tenth of a second at most for a stalled frame), and keeps scrolling while the pointer stays still: zoomed in, a Selection tool move carries the art on past what showed, and a drawing tool's shape goes on growing. Only once the press has dragged, with the pointer over the canvas itself (past its edge, over a panel, the Selection tools hand the art to the panels instead, #2826); back away from the edge it stops. The zone and speeds are VectorCraft's own (`canvas::tests_edge_scroll` tests `a_move_held_near_the_right_edge_scrolls_the_view_and_carries_the_art`, `a_rectangle_drag_held_near_the_bottom_edge_keeps_growing`, `a_press_held_still_near_the_edge_does_not_scroll`, `a_hand_drag_held_near_the_edge_does_not_scroll_on` and `edge_scroll_moves_the_content_away_from_the_edge_the_pointer_is_near`). + - A tool drag held within 24 points of an edge of the canvas scrolls the view away from that edge (#8551), faster nearer it (up to 900 points a second at the edge and no faster in a corner, a tenth of a second at most for a stalled frame), by whole device pixels with a remainder of its own, and keeps scrolling while the pointer stays still: zoomed in, a Selection tool move carries the art on past what showed, and a drawing tool's shape goes on growing. Only once the pointer has moved 3 points from the press on screen (a wheel scroll under a still press does not count), with the pointer over the canvas itself (past its edge, over a panel, the Selection tools hand the art to the panels instead, #2826); back away from the edge it stops. The zone and speeds are VectorCraft's own (`canvas::tests_edge_scroll` tests `a_move_held_near_the_right_edge_scrolls_the_view_and_carries_the_art`, `a_rectangle_drag_held_near_the_bottom_edge_keeps_growing`, `a_press_held_still_near_the_edge_does_not_scroll`, `a_hand_drag_held_near_the_edge_does_not_scroll_on`, `a_wheel_scroll_under_a_still_press_near_the_edge_does_not_start_edge_scrolling`, `edge_scroll_moves_the_content_away_from_the_edge_the_pointer_is_near` and `edge_scroll_pixels_keep_the_remainder_of_an_axis_that_does_not_scroll`). - Rows dragged in the Layers panel and held within 28 points of the list's top or bottom edge scroll a long list that way, faster nearer the edge (60 points a second at the band's inner side, 340 at the edge, at every frame rate), and keep scrolling while the pointer stays still, so a row out of view can take the drop (a move, or a copy with Alt); the Libraries panel's list scrolls by the same rule. In a list view shorter than 56 points each band is half the view, so a pointer in the top half scrolls up, one in the bottom half scrolls down, and a pointer just outside the view does not scroll it toward the far edge. A pointer beside the list, a drag of the eye or lock column and a release stop the scrolling, and scrolling changes nothing in the document. The band and speeds are VectorCraft's own (`panels::layers` tests `rows_held_near_the_bottom_or_top_edge_scroll_the_list_to_a_row_out_of_view`, `a_held_row_scrolls_the_list_as_far_in_the_same_time_at_any_frame_rate` and `the_list_scrolls_only_for_rows_held_over_it`; `panels` test `drag_scrolling_in_a_short_list_goes_toward_the_nearer_edge`). - The other panels' item drags start only with the primary mouse button too: swatches and color groups, brushes, symbols, graphic styles, library items and groups, character and paragraph styles, Appearance rows and its thumbnail, the Fill and Stroke squares, Recent Colors and the Gradient panel's thumbnail. A right or middle drag on one carries nothing, moves, copies, deletes and applies nothing and records no undo step; right-click menus and the Graphic Styles panel's held right-button preview stay as they were (`panels::swatches` test `only_a_primary_drag_moves_swatches_and_groups`, `panels::text_styles` test `only_a_primary_drag_carries_a_style_row`, `panels::tests_symbol_libraries` test `only_a_primary_drag_carries_a_library_symbol_out`, `panels::tests_effectedit` test `only_a_primary_drag_carries_the_thumbnail_or_a_row`). - Panels undock (#495): a dock tab, a panel icon or a popped-out panel's title dragged out of the dock floats that panel (in an OS window of its own on the desktop, #4135), and the strip right of the dock's tabs floats the whole tabbed group. A floating group moves by its title bar, a tab dragged out of it floats on its own, and dropped on another group's title bar or tabs it stacks with that group; dropped on a dock group's tabs, which light up under the pointer, its panels join that group, and on the group's upper or lower half they make a new group above or below it (`window.panel.dock {anchor, zone}`); dropped on the icon column they become icons there, the tabbed group's panels too (`window.panel.dock {icon: true}`); dropped anywhere else on the dock, which lights up, they go back where they live (the tabbed group or the icon column), as its × and the panel menus' Float Panel / Dock Panel do (`window.panel.float`, `window.panel.dock`). The Tools panel floats by its title bar and docks again on the window's left edge. Floating groups stack into sets: dropped on the upper or lower half of another group (a line shows where), a group joins it right above or below it, and the set's groups stack top to bottom, each showing one panel, moving together by the top group's title bar, whose × docks them all; a group dragged by its tab strip leaves the set (`window.panel.float {below, above}`). A double-click on a tab collapses a floating group to its tabs (`collapsed`), and a dock group too, a group below it moving up into the room; a second double-click, or a click on another of its tabs, expands it (`window.panel.collapse`, kept with the preferences and in saved workspaces). Sets dropped on the left edge of the icon column or of another dock column dock as dock columns (a multi-column dock, `window.panel.dock {column}`), whose groups stack, tab and tear out as a floating set's do, and whose top strip floats the column again. Floating panels, their sets and the Tools panel's position are kept with the preferences and in user workspaces, and clamped into a smaller window. Not done: panels in separate OS windows, reordering tabs by dragging, collapsing a set or dock column to icons, dock columns right of the default dock, resizing floating panels and the groups of a set. diff --git a/docs/ui-parity.md b/docs/ui-parity.md index db3e240bc9..692d5b98f9 100644 --- a/docs/ui-parity.md +++ b/docs/ui-parity.md @@ -334,7 +334,7 @@ tools, never checked side by side) isn't captured row by row. |---|---|---| | Space: Hand; Cmd+Space / Cmd+Alt+Space: zoom in/out; middle button pans | done | Space pressed after a tool takes a drag keeps the view still and shows that tool's cursor. Shape and anchor tools may use Space to move the geometry being drawn. Cmd+Space pressed mid-drag likewise keeps the active tool cursor. Space held before a press starts a view gesture, and its view cursor returns after release. `space_during_a_pencil_drag_keeps_the_pencil_cursor`, `cmd_space_mid_tool_drag_keeps_the_active_tool_cursor` | | Document window scroll bars along the right and bottom edges (Normal and Full Screen Mode with Menu Bar; none in Full Screen and Presentation Mode): a thumb as long as the view against the art and the artboards; dragging it scrolls, a click on the track pages, the wheel over a bar scrolls along it; in a rotated view they follow the screen's axes | partial | #2322. The span is the art and the artboards with half a window around them, not Illustrator's 227 in canvas: VectorCraft has no bounded drawing area (#2284). A track click pages rather than jumping to the click; the page size and the rotated-view behaviour are our own choice (the public documentation gives neither) | -| A tool drag held near an edge of the canvas scrolls the view (#8551): zoomed in, a selection moved, a shape drawn or a marquee dragged towards the panels goes on past what shows | partial | Within 24 points of the canvas edge, once the press has dragged, the view scrolls away from that edge, faster nearer it (up to 900 points a second at the edge), and keeps scrolling while the pointer stays still; the tool gets the pointer's new place in the document, so moved art stays under the pointer. Back away from the edge it stops. A click near the edge, the Hand, Zoom and Rotate View drags and Space panning do not scroll. The pointer past the canvas edge does not scroll: over a panel the Selection tools hand the art to the panels (#2826). The zone and speeds are VectorCraft's own (the public documentation gives none). Tests: `canvas::tests_edge_scroll` | +| A tool drag held near an edge of the canvas scrolls the view (#8551): zoomed in, a selection moved, a shape drawn or a marquee dragged towards the panels goes on past what shows | partial | Within 24 points of the canvas edge, once the pointer has moved 3 points from the press, the view scrolls away from that edge, faster nearer it (up to 900 points a second at the edge, and no faster in a corner, where it scrolls both ways), and keeps scrolling while the pointer stays still; the tool gets the pointer's new place in the document, so moved art stays under the pointer. Back away from the edge it stops. A click near the edge, the Hand, Zoom and Rotate View drags and Space panning do not scroll. The pointer past the canvas edge does not scroll: over a panel the Selection tools hand the art to the panels (#2826). The zone and speeds are VectorCraft's own (the public documentation gives none). Tests: `canvas::tests_edge_scroll` | | Cmd/Ctrl: last-used selection tool; Cmd+Alt: Group Selection inside Direct Selection | done | Cmd+Alt lends Group Selection only while Direct Selection is active (Cmd borrow from the Pen keeps Direct Selection so Alt stays copy/subtract); Cmd alone lends Direct Selection the Selection tool: its bounding box shows while Cmd is held over objects selected whole and its handles scale and rotate them, and a Cmd drag moves the whole object while its direct-selected anchors stay selected (#3901; no box over a selection with anchors picked yet); engine pointer and canvas regressions | | Eyedropper copies effective character dimensions between transformed text objects | done | Point/area and grouped text, highlighted ranges, reverse/remembered sampling, opt-outs and atomic invalid-transform rejection; `scaled_type_pick_*` (#6404) | | Eyedropper styles highlighted characters only and preserves ranges across Type switches | done | Font/paint, Shift color-only, Unicode, Undo/Redo and stale-range regression tests; enabled non-neutral source or target object transparency is refused atomically; disable Transparency to sample supported attributes |