Commit Graph
1776 Commits
Author SHA1 Message Date
aiongg 13d837363d Dropdowns: menus grow back after a search with no matches (#4337)
* chore(deps): pin craft-libs to 62bb0e1d (shared combo box)

* fix(ui-egui): dropdown menus grow back after their contents shrink

Every combo box is craft_ui::ComboBox, whose menu follows its contents'
height while it is open (egui#5225); clippy.toml bans egui::ComboBox.

The font family menu is a craft_ui::combo::Menu under its field, with the
search field and filters in its header and the family rows scrolling under
them, still laid out only in view. The menu keeps to the room on its side
of the field, so the list's minimum height and the popup's room are gone.

* fix(ui-egui): the shortcut import's target picker grows back after a search

Its search field, "No equivalent" and the row's choices are the header of
a craft_ui::combo::Menu, and Keyboard Shortcuts' entries scroll under
them. That was the last menu on the popup path that capped itself at the
room left, so that path and combo's `searchable` flag are gone.

* chore(deps): craft-libs 60d60d48 (dropdown fixes)

* chore(deps): craft-libs 4d7b82f7 (dropdown fixes)

* chore(deps): craft-libs 92d392cf (#387 merged)

* chore(xtask): pdf-deps expects craft-libs 92d392cf
2026-10-27 10:36:58 -04:00
ham9zah 0365cf3ae3 Appearance: shared rows map one by one, and effect dialogs edit each copy (#4174)
Review follow-ups:

- items_per_target maps each requested row on its own. Rows deleted or
  duplicated together, one shared and one not, fell back to the literal
  indices in every object, so the other objects could lose the wrong
  items. The first object takes its own rows; each other object takes
  its copies of the shared ones only.
- effect.dialog takes `aligned` (the panel passes it on a mixed
  selection's shared effect row), and its OK and preview run
  effect.setParams with it, so the dialog edits each object's own copy
  of the effect instead of the first object's index in every object.

Tests: removing a shared stroke with an unshared fill leaves the other
object's fills; an aligned dialog's command carries `aligned`.
2026-10-27 14:36:13 +07:00
ham9zah 8305ccf998 Appearance: a mixed selection lists the attributes its objects share (#4174)
With several objects selected whose appearances differ in anything (two
circles whose fills differ but whose stroke and effect are the same),
the Appearance panel showed only "Mixed Appearances": no stroke, effect
or opacity row, so attributes the objects share couldn't be edited
together. It now lists what they share, as the issue describes:

- `vectorcraft_doc::appearance::SharedStack` (with `align`, a stacking-
  order longest-common-subsequence match) gives the fills, strokes and
  object-level effects every object has an equal copy of, and where each
  is in every object's own stack.
- The panel's object row names the objects' common kind ("Path",
  "Ellipse"; "Mixed Objects" only when kinds differ, as the Control bar
  does), with an italic "Mixed Appearances" row under it when they
  differ, then only the shared rows with their usual controls. The
  Opacity row reads "Mixed" when opacity or blend mode differ (an edit
  sets them all). The object row shows no fill chip when the fills
  differ. Rows aren't dragged in a mixed selection: where a row would go
  in each of several different stacks isn't one place.
- The engine maps a shared row to each object's own item: the active
  item (a row of the first selected object's stack) always does, so the
  Color, Stroke and Transparency panels edit every object's matching
  item, and the item and effect commands do with `aligned: true`
  (appearance.setItem / removeItem / duplicateItem, effect.remove /
  duplicate / setParams / lightingPreset, transparency.set), each as
  one undo step. moveItem and effect.move refuse aligned rows of
  differing stacks. Without `aligned`, explicit indices keep their
  meaning for single objects and scripts.
- "Mixed" is added to every catalog.

Tests: the shared stack of the issue's case, of a stroke at another
index, of nothing alike and of equal stacks, and that matches never
cross; editing the shared stroke edits both strokes (at index 1 and 2)
in one undo step that restores both, also through stroke.set on the
active row; removing a shared effect and adding a fill reach both, and
reordering differing stacks is refused; the panel lists kind, note,
Stroke, Feather and Opacity, not Fill, the full stack for alike objects
and "Mixed Objects" for a path and type. The existing object-row test
now expects the kind for two rectangles and the shared rows when their
opacity differs.
2026-10-27 14:36:13 +07:00
nrq6993-a11y dfec712c2d G2: Scribble effect Settings presets
Squashed from #4274 onto main.
2026-10-27 14:36:12 +07:00
dotCooCoo ca60c8e8a7 Brushes: New Brush makes the brush from the art its options opened with
OK in a new scatter, art or pattern brush's Brush Options ran brush.new
without the art the dialog had captured for its preview, so brush.new
read the selection again. A selection changed while the dialog was open
gave the brush other art than the preview showed, and a cleared
selection made OK fail. OK now passes the captured art (the side tile
for a pattern brush) to brush.new.
2026-10-27 14:36:12 +07:00
nrq6993-a11y 678cff6707 G4: Optical margin menu uses shared text flag
Squashed from #4309 onto main.
2026-10-27 14:36:12 +07:00
aiongg e724228e25 docs: update source paths for the moved files 2026-10-26 22:01:25 +00:00
aiongg f21dc9e0a3 test(ui-egui): read file_dialog_open from app/files.rs in the picks scan 2026-10-26 22:01:25 +00:00
aiongg c50026fc86 refactor(ui-egui): move lib.rs items to {app,app/clipboard,app/commands,app/control,app/files,app/fonts,app/frame,app/ime,app/input,app/links,app/prefs,app/screenshot,app/view,caches,clock,services,state}.rs 2026-10-26 21:45:33 +00:00
aiongg 055d017603 refactor(ui-egui): move widgets.rs items to widgets/{blend,buttons,chips,color,drag,dropdowns,labels,numeric,panel_chrome,text,toggles}.rs 2026-10-26 21:45:33 +00:00
aiongg b3789b280c refactor(ui-egui): move shortcuts.rs items to shortcuts/{paste,presentation,typing}.rs 2026-10-26 21:45:33 +00:00
aiongg 556825b363 refactor(ui-egui): move panels/swatches.rs items to panels/swatches/{actions,body,dnd,libraries,tiles}.rs 2026-10-26 21:45:33 +00:00
aiongg d8a6f8f3d8 refactor(ui-egui): move panels/layers.rs items to panels/layers/{controls,model,rows,thumbs}.rs 2026-10-26 21:45:33 +00:00
aiongg 16cdbd1b33 refactor(ui-egui): move menus.rs items to menus/{bar,context,entries,invoke,labels,run,slots,state,submenus,tree,ui_commands}.rs 2026-10-26 21:45:33 +00:00
aiongg 5dfd01e1f1 refactor(ui-egui): move io.rs items to io/{export,open,save}.rs 2026-10-26 21:45:33 +00:00
aiongg bd1559b8fe refactor(ui-egui): move chrome.rs items to chrome/{control_bar,hints,status_bar,tabs}.rs 2026-10-26 21:45:33 +00:00
aiongg dbce5020f2 refactor(ui-egui): move canvas.rs items to canvas/{artboards,context,cursor,drag,grid,home,input,outline,overlays,raster,task_bar,tool_overlays,view}.rs 2026-10-26 21:45:33 +00:00
aiongg 303d9a0a4d test(ui-egui): read tl! literals past test-only imports 2026-10-26 21:17:08 +00:00
aiongg f1d427762b style: cargo fmt on files moved without formatting 2026-10-26 19:32:10 +00:00
aiongg 2b70dc2d9c refactor(ui-egui): move dialogs/revolve.rs tests to dialogs/revolve/tests.rs 2026-10-26 18:33:16 +00:00
aiongg 6909734d9e refactor(ui-egui): move panel_docking.rs test files to panel_docking/ 2026-10-26 18:33:16 +00:00
aiongg 1fa3699634 refactor(ui-egui): move layout_migration.rs tests to layout_migration/tests.rs 2026-10-26 18:33:16 +00:00
aiongg e5451f1579 refactor(ui-egui): move tests_*.rs to tests/<topic>.rs 2026-10-26 18:33:15 +00:00
aiongg ebccd3a9ed refactor(ui-egui): move screen_color.rs tests to screen_color/tests.rs 2026-10-26 18:18:18 +00:00
aiongg ed276d89d4 refactor(ui-egui): move panels/libraries.rs tests to panels/libraries/tests.rs 2026-10-26 18:18:18 +00:00
aiongg a899981893 refactor(ui-egui): move opening.rs tests to opening/tests.rs 2026-10-26 18:18:18 +00:00
aiongg 17e36b62b1 refactor(ui-egui): move dialogs/save_pdf.rs tests to dialogs/save_pdf/tests.rs 2026-10-26 18:18:18 +00:00
aiongg b76a161783 refactor(ui-egui): move font_menu.rs tests to font_menu/tests.rs 2026-10-26 18:18:18 +00:00
aiongg 5052b3e5ac refactor(ui-egui): move dialogs/find_links.rs tests to dialogs/find_links/tests.rs 2026-10-26 18:18:18 +00:00
aiongg 29e311afdd refactor(ui-egui): move dialogs/save_options.rs tests to dialogs/save_options/tests.rs 2026-10-26 18:18:18 +00:00
aiongg 0f5658d270 refactor(ui-egui): move control.rs tests to control/tests.rs 2026-10-26 18:18:18 +00:00
aiongg 9c9a2cff2f refactor(ui-egui): move dialogs/freehand.rs tests to dialogs/freehand/tests.rs 2026-10-26 18:18:18 +00:00
aiongg ee8fd812ff refactor(ui-egui): move dialogs/missing_fonts.rs tests to dialogs/missing_fonts/tests.rs 2026-10-26 18:18:18 +00:00
aiongg 3de34b1225 refactor(ui-egui): move widgets.rs look_tests to widgets/look_tests.rs 2026-10-26 18:18:18 +00:00
aiongg 4a8e69490c refactor(ui-egui): move edit_toolbar.rs tests to edit_toolbar/tests.rs 2026-10-26 18:18:17 +00:00
aiongg 04b9425f5e refactor(ui-egui): move prefs_dialog.rs tests to prefs_dialog/tests.rs 2026-10-26 18:18:17 +00:00
aiongg 11c85f47f1 refactor(ui-egui): move dialogs/width_point.rs tests to dialogs/width_point/tests.rs 2026-10-26 18:18:17 +00:00
aiongg 47abe15bf5 refactor(ui-egui): move placing.rs tests to placing/tests.rs 2026-10-26 18:18:17 +00:00
aiongg aafbd39745 refactor(ui-egui): move panels/gradient.rs tests to panels/gradient/tests.rs 2026-10-26 18:18:17 +00:00
aiongg 5ce87c626f refactor(ui-egui): move dialogs/brush_options.rs tests to dialogs/brush_options/tests.rs 2026-10-26 18:18:17 +00:00
aiongg d129469e90 refactor(ui-egui): move panels/transform.rs tests to panels/transform/tests.rs 2026-10-26 18:18:17 +00:00
aiongg 24a2b891fc refactor(ui-egui): move panels/text_styles.rs tests to panels/text_styles/tests.rs 2026-10-26 18:18:17 +00:00
aiongg 8708a107f7 refactor(ui-egui): move cursors.rs tests to cursors/tests.rs 2026-10-26 18:18:17 +00:00
aiongg dd22bf4b1d refactor(ui-egui): move panels/appearance.rs tests to panels/appearance/tests.rs 2026-10-26 18:18:17 +00:00
aiongg 6ceee3e8e7 refactor(ui-egui): move panels/paragraph.rs tests to panels/paragraph/tests.rs 2026-10-26 18:18:17 +00:00
aiongg bfcd245bb6 refactor(ui-egui): move panels/color.rs tests to panels/color/tests.rs 2026-10-26 18:18:17 +00:00
aiongg fcb227a87c refactor(ui-egui): move panels/tabs.rs tests to panels/tabs/tests.rs 2026-10-26 18:18:17 +00:00
aiongg 4d174fd4a6 refactor(ui-egui): move panels/character.rs tests to panels/character/tests.rs 2026-10-26 18:18:17 +00:00
aiongg 36b6c513f7 refactor(ui-egui): move panels/brushes.rs tests to panels/brushes/tests.rs 2026-10-26 18:18:17 +00:00
aiongg 66bddeaac7 refactor(ui-egui): move panels/library_panel.rs tests to panels/library_panel/tests.rs 2026-10-26 18:18:17 +00:00