mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-25 20:01:07 +01:00
Look: production's breathing room across VectorCraft (type size, menus, dialogs, Home, panels) and main's lib test fixes (#9292)
* Theme: type at the size production draws it. Production set Inter at 92% of its nominal size, so its 13-point body, 12.5-point labels and 11.5-point captions read at 12, 11.5 and 10.5 points; SIZES took the nominal sizes, which drew every text about 8% larger than production on the same rows. Body and strong body 12, labels 11.5, captions 10.5, line heights kept. Dialog buttons at least 72 points wide, as production's.
* Theme: menus and dialogs as production spaces them. 29-point menu rows (production's 24-point rows 5 points apart), dialogs 22 points inside their edge (production's dialog margin) and 28-point dialog buttons. Needs a craft-libs rev with size.row.menu, size.dialog.button_height and space.pad.dialog (fix/vc-look9-metrics): on an older rev SIZES does not parse. Land it after that rev move.
* Home: production's rhythm through the framework's page sizes: 9 from title to subtitle, 27 to New and Open, which stand 28 high with 16 points beside their labels and 14 apart, 33 between sections, 15 under a heading, the community links in 24-point rows 5 apart and in the link colour alone (LinkLook::Plain on Home only); Learn's skills a heading gap apart, each title muted over its tutorials, which stand as tall as New and Open, as production's secondary buttons did
* Swatches: thumbnails at production's sizes and the footer split as production
The thumbnail views give the browser zooms of 1/4, 1/3 and 2/3 on the large
thumbnail: 12, 16 and 32 point tiles, production's 11, 15.5 and 30. The
library panels' saved view follows the new zooms. Swatch Libraries, Show
Swatch Kinds and the edit action stand at the footer's start edge; New Color
Group, New Swatch and Delete at its end edge.
* Color Guide: the footer split as production
Limit to Library stands at the start edge; Edit or Apply Colors, Save
selected colors and Save color group at the end edge, in that order.
* Graphic Styles: 40-point tiles in Thumbnail View
Thumbnail View sets its own zoom, as the list views do, so its tiles are
production's 40 points and no longer keep a list view's zoom.
* Align panel: the reference app's groups and rules: the align and distribute buttons in groups a section gap apart, a rule between Align Objects and Distribute Objects, and Distribute Spacing and Align To on one line with a rule between them
* Transform panel: a rule over the shape properties and over the options, as the reference app had
* Info panel: the two columns of numbers are equal halves of the panel, as the reference app had them
* Layers panel: the footer's layer count is a text unit of the footer row in the text ink, as the reference app showed it
* Libraries panel: the no-library notice shows the library icon over its title, as the reference app did
* craft-libs: next 5442cfb97, with the page rhythm tokens, LinkLook, the menu row height and the dialog padding and button height the look commits set
* Docking test: the report names the panel that has the keys after a click in its search field. A press on a dock tab now leaves the keys where they were (craft-libs TabStrip::keeps_focus), so the tab click alone no longer focuses the panel; the search lookup is a harness helper both tests use
* craft-libs: next 6fcf61c81, a document window raised as Presentation Mode ends comes to the front
* Canvas drops: a canvas takes no drop where a floating panel's OS window lies over it
The canvas's drop catcher accepted art carried off its own canvas wherever
the pointer was over the canvas, including where a floating panel's OS window
lies over it. The main window's pass runs first, so the canvas took the drop
and resumed the move, and the panel under the pointer got nothing. Every
target of the catcher now refuses a point that panel_docking::os_window_at
reports covered, the same rule the Selection tools' carry uses.
It used to work by accident: the carry's covered test flickered every other
frame, the move dispatched a drag in those frames, and the changed revision
made the canvas refuse the carried art until the release.
* Safe Mode: the choice about a stopped plug-in opens on the host at once
The choice was put on the host's startup queue, which the host drains
only at the start of its next pass. On main the first frame happened to
run a second pass (layout memory asked for a rerun), so the choice was
open by the end of the launch frame; the framework now settles that
frame in one pass, and the choice stayed queued until the frame after,
where an agent's ui.dialog.* found no hosted dialog open. The choice is
only asked for on an empty host, so opening it directly is what the
queue would do one pass later.
* Image Trace sampler test: a step runs until the press lifecycle reported its events
run_ui stopped stepping once egui had seen every pointer event of the
step. The press lifecycle reports one phase a pass, so a pass that
brings a release and the next press (two clicks in one frame) reports
the press's Down one pass later and holds its release for the pass after
that, asking for a repaint. The step ended before that pass, and the
second click of review_597048_two_ordinary_clicks_in_one_frame_survive_
sampler_correction never reached the tool, so the group did not isolate.
It passed before by accident: with craft-libs a4b6d3b6ca every other
frame ran a second pass, and the held release landed in it. With
6fcf61c81 each of these frames runs one pass. The step now also counts
the phases owed and runs empty frames until the passes have caught up.
* Shapes add-on: the helper that maps a shape tool to its icon is icon_for_shape, so the icon test no longer reads its tool ids ("polygon", "no-such-tool") as icon ids
* Native panel window test: drop the art on the first graphic style's tile
The test dropped the art 60 x 120 points into the Graphic Styles window. Since
Thumbnail View's tiles are 40 points (df940cff4e) the tile row ends at 116
points, so that point lies in the empty room below the tiles, which takes no
drop, and the panel made no style. The test now finds the first style's tile
by its name in the window's access tree and drops the art there. The test
host keeps each window's named access nodes for that.
This commit is contained in:
1 parent
2a5dbc479f
commit
e4347f0d6f
23 files changed
+379
-259
No files matched your search
Generated
+80
-80
@@ -1134,7 +1134,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"craft-automation",
|
||||
"craft-behavior",
|
||||
@@ -1175,7 +1175,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-affinity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"crc32fast",
|
||||
"flate2",
|
||||
@@ -1186,7 +1186,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-appkit"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"block2 0.6.2",
|
||||
"objc2-app-kit 0.3.2",
|
||||
@@ -1196,7 +1196,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-atomic"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"rustix 1.1.6",
|
||||
]
|
||||
@@ -1204,7 +1204,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-automation"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"base64 0.23.1",
|
||||
"craft-behavior",
|
||||
@@ -1229,7 +1229,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-behavior"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"accesskit",
|
||||
"bitflags 2.13.2",
|
||||
@@ -1247,7 +1247,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-browse"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"craft-behavior",
|
||||
"craft-docpath",
|
||||
@@ -1265,7 +1265,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-cdr"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"crc32fast",
|
||||
"flate2",
|
||||
@@ -1274,7 +1274,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-cloud-ui"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"egui",
|
||||
]
|
||||
@@ -1282,7 +1282,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-cms"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"md-5",
|
||||
"rayon",
|
||||
@@ -1291,12 +1291,12 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-codepage"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
|
||||
[[package]]
|
||||
name = "craft-color-ui"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"craft-behavior",
|
||||
"craft-cms",
|
||||
@@ -1316,7 +1316,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-control"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"getrandom 0.3.4",
|
||||
"serde",
|
||||
@@ -1326,7 +1326,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-dds"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"rayon",
|
||||
]
|
||||
@@ -1334,7 +1334,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-dialogs"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"block2 0.6.2",
|
||||
"craft-atomic",
|
||||
@@ -1359,7 +1359,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-docpath"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
@@ -1367,7 +1367,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-draw"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"craft-behavior",
|
||||
"craft-color-ui",
|
||||
@@ -1386,7 +1386,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-dxf"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"craft-codepage",
|
||||
"encoding_rs",
|
||||
@@ -1398,12 +1398,12 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-eps"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
|
||||
[[package]]
|
||||
name = "craft-font-catalog"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"fontique",
|
||||
"harfrust 0.13.3",
|
||||
@@ -1418,7 +1418,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-font-manager"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"craft-behavior",
|
||||
"craft-font-catalog",
|
||||
@@ -1437,7 +1437,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-font-store"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"cap-primitives",
|
||||
"craft-atomic",
|
||||
@@ -1459,12 +1459,12 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-fonts-build"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
|
||||
[[package]]
|
||||
name = "craft-gif"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"gif",
|
||||
]
|
||||
@@ -1472,7 +1472,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-gzip"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"flate2",
|
||||
]
|
||||
@@ -1480,7 +1480,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-host"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"bitflags 2.13.2",
|
||||
"craft-i18n",
|
||||
@@ -1493,7 +1493,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-i18n"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"fixed_decimal",
|
||||
@@ -1521,7 +1521,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-image-codecs"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"craft-dds",
|
||||
"craft-jpeg",
|
||||
@@ -1548,7 +1548,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-imaging"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"craft-behavior",
|
||||
"craft-color-ui",
|
||||
@@ -1566,7 +1566,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-jpeg"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"thiserror 2.0.21",
|
||||
]
|
||||
@@ -1574,7 +1574,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-jxl"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"brotli-decompressor 5.0.3",
|
||||
"jixel",
|
||||
@@ -1585,7 +1585,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-keymap"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"craft-host",
|
||||
"craft-i18n",
|
||||
@@ -1600,7 +1600,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-layers"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"craft-behavior",
|
||||
"craft-i18n",
|
||||
@@ -1614,7 +1614,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-menu"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"craft-behavior",
|
||||
"craft-host",
|
||||
@@ -1632,7 +1632,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-metadata"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"brotli-decompressor 6.3.2",
|
||||
"chrono",
|
||||
@@ -1644,7 +1644,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-metafile"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"encoding_rs",
|
||||
"image",
|
||||
@@ -1655,7 +1655,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-mime"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"craft-codepage",
|
||||
@@ -1665,7 +1665,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-pages"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"craft-behavior",
|
||||
"craft-keymap",
|
||||
@@ -1681,7 +1681,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-pdf"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"hayro-interpret",
|
||||
"hayro-syntax",
|
||||
@@ -1693,7 +1693,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-platform"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"async-channel",
|
||||
"async-io",
|
||||
@@ -1724,7 +1724,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-plotter"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"kurbo 0.13.1",
|
||||
"thiserror 2.0.21",
|
||||
@@ -1733,7 +1733,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-print"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"craft-behavior",
|
||||
"craft-host",
|
||||
@@ -1757,7 +1757,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-proof"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"log",
|
||||
"miniz_oxide 0.9.1",
|
||||
@@ -1768,7 +1768,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-ps"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"craft-eps",
|
||||
"flate2",
|
||||
@@ -1782,7 +1782,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-psd"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"encoding_rs",
|
||||
"flate2",
|
||||
@@ -1793,7 +1793,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-quit"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"dispatch2",
|
||||
"egui",
|
||||
@@ -1806,7 +1806,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-review"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"base64 0.23.1",
|
||||
"craft-behavior",
|
||||
@@ -1825,7 +1825,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-settings"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"craft-atomic",
|
||||
"craft-host",
|
||||
@@ -1842,7 +1842,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-stream-codecs"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"fax",
|
||||
"hayro-ccitt",
|
||||
@@ -1853,7 +1853,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-svg"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"craft-image-codecs",
|
||||
"craft-xml",
|
||||
@@ -1874,7 +1874,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-table"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"craft-behavior",
|
||||
"craft-keymap",
|
||||
@@ -1886,7 +1886,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-text"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"craft-behavior",
|
||||
"craft-font-manager",
|
||||
@@ -1911,7 +1911,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-theme"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"bitflags 2.13.2",
|
||||
"craft-tracked",
|
||||
@@ -1926,7 +1926,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-theme-store"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"craft-atomic",
|
||||
"craft-behavior",
|
||||
@@ -1941,7 +1941,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-tiff"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"thiserror 2.0.21",
|
||||
@@ -1951,7 +1951,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-time"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"thiserror 2.0.21",
|
||||
@@ -1960,7 +1960,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-timeline"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"craft-behavior",
|
||||
"craft-keymap",
|
||||
@@ -1975,12 +1975,12 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-tracked"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
|
||||
[[package]]
|
||||
name = "craft-ui"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"craft-cloud-ui",
|
||||
"craft-ui-canvas",
|
||||
@@ -1994,7 +1994,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-ui-canvas"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"craft-behavior",
|
||||
"craft-i18n",
|
||||
@@ -2010,7 +2010,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-ui-contract"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"accesskit",
|
||||
"craft-behavior",
|
||||
@@ -2048,7 +2048,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-ui-macros"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"proc-macro-crate",
|
||||
"proc-macro2",
|
||||
@@ -2059,7 +2059,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-ui-panels"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"craft-behavior",
|
||||
"craft-host",
|
||||
@@ -2077,7 +2077,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-ui-patterns"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"craft-behavior",
|
||||
"craft-host",
|
||||
@@ -2098,7 +2098,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-ui-shell"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"craft-behavior",
|
||||
"craft-host",
|
||||
@@ -2119,7 +2119,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-ui-widgets"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"craft-behavior",
|
||||
"craft-host",
|
||||
@@ -2138,7 +2138,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-update"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"craft-host",
|
||||
@@ -2167,7 +2167,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-vectorcraft-format"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"flate2",
|
||||
"serde",
|
||||
@@ -2178,7 +2178,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-wayland"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"raw-window-handle",
|
||||
"wayland-backend",
|
||||
@@ -2188,7 +2188,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-web-api"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"js-sys",
|
||||
"serde_json",
|
||||
@@ -2199,7 +2199,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-win32"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"winsafe",
|
||||
]
|
||||
@@ -2207,7 +2207,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-window"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"craft-appkit",
|
||||
"craft-atomic",
|
||||
@@ -2239,7 +2239,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-xml"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"quick-xml 0.41.0",
|
||||
"serde",
|
||||
@@ -3507,7 +3507,7 @@ checksum = "9f4d0e94ddd48749f06bbe4e5389fb9799a0c45bcaf00495042076ef05e3241a"
|
||||
[[package]]
|
||||
name = "hayro-cmap"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"brotli",
|
||||
"hayro-postscript",
|
||||
@@ -3516,7 +3516,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "hayro-interpret"
|
||||
version = "0.7.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"bitflags 2.13.2",
|
||||
"hayro-cmap",
|
||||
@@ -3534,7 +3534,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "hayro-jbig2"
|
||||
version = "0.3.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"fearless_simd",
|
||||
"hayro-ccitt",
|
||||
@@ -3552,12 +3552,12 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "hayro-postscript"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
|
||||
[[package]]
|
||||
name = "hayro-syntax"
|
||||
version = "0.7.2"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"flate2",
|
||||
"hayro-ccitt",
|
||||
@@ -4488,7 +4488,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "krilla"
|
||||
version = "0.8.2"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"bumpalo",
|
||||
@@ -4645,7 +4645,7 @@ checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4"
|
||||
[[package]]
|
||||
name = "linesweeper"
|
||||
version = "0.5.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4bed21baaa41d2b47bef90879c04df521f6f6043#4bed21baaa41d2b47bef90879c04df521f6f6043"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6fcf61c816c399508a60c7029a59e2c7b6139e0b#6fcf61c816c399508a60c7029a59e2c7b6139e0b"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"kurbo 0.13.1",
|
||||
|
||||
+34
-34
@@ -11,44 +11,44 @@ rust-version = "1.95"
|
||||
repository = "https://github.com/storytold/vectorcraft"
|
||||
|
||||
[workspace.dependencies]
|
||||
craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043" }
|
||||
craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043", default-features = false, features = ["interpret", "write"] }
|
||||
craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043" }
|
||||
craft-proof = { git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043" }
|
||||
craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b" }
|
||||
craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b", default-features = false, features = ["interpret", "write"] }
|
||||
craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b" }
|
||||
craft-proof = { git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b" }
|
||||
# The `.vectorcraft` envelope: its members, version, embedded images and the data after the JSON.
|
||||
craft-vectorcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043" }
|
||||
craft-gzip = { git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043" }
|
||||
craft-vectorcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b" }
|
||||
craft-gzip = { git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b" }
|
||||
# Native Affinity documents (craft-libs#914).
|
||||
craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043" }
|
||||
craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b" }
|
||||
# Bounded CDR (v1-v27) and CMX (32-bit) reader (craft-libs#778).
|
||||
craft-cdr = { git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043" }
|
||||
craft-cdr = { git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b" }
|
||||
# SVG parsing, limits, SVGZ and writer (craft-libs#778).
|
||||
craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043", features = ["tree"] }
|
||||
craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043" }
|
||||
craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b", features = ["tree"] }
|
||||
craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b" }
|
||||
# EPS container, previews, ASCII85 and DSC comments (craft-libs#778).
|
||||
craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043" }
|
||||
craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b" }
|
||||
# DXF tags, reader and writer (craft-libs#778, #926, #927).
|
||||
craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043" }
|
||||
craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043" }
|
||||
craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b" }
|
||||
craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b" }
|
||||
# WMF, EMF and EMF+ reader (craft-libs#778).
|
||||
craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043" }
|
||||
craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043" }
|
||||
craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043" }
|
||||
craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043" }
|
||||
craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043" }
|
||||
craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043", default-features = false, features = ["read", "write"] }
|
||||
craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043" }
|
||||
craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043" }
|
||||
craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043" }
|
||||
craft-codepage = { git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043" }
|
||||
craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b" }
|
||||
craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b" }
|
||||
craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b" }
|
||||
craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b" }
|
||||
craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b" }
|
||||
craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b", default-features = false, features = ["read", "write"] }
|
||||
craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b" }
|
||||
craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b" }
|
||||
craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b" }
|
||||
craft-codepage = { git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b" }
|
||||
# The framework facade (`craft::ui`, `craft::settings`, `craft::platform`, ...). No default features: each crate names
|
||||
# the members it imports.
|
||||
craft = { git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043" }
|
||||
craft = { git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b" }
|
||||
# Below the egui layer, so not through the facade: the colour harmony rules and their settings (craft-color-ui
|
||||
# without its `ui` feature), the colour type they work in, and the craft-fonts tables the text crate's build writes.
|
||||
craft-color-ui = { git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043" }
|
||||
craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043" }
|
||||
craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043" }
|
||||
craft-color-ui = { git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b" }
|
||||
craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b" }
|
||||
craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b" }
|
||||
# internal
|
||||
vectorcraft-geom = { path = "crates/geom" }
|
||||
vectorcraft-color = { path = "crates/color" }
|
||||
@@ -191,13 +191,13 @@ lto = "thin"
|
||||
codegen-units = 1
|
||||
|
||||
[patch.crates-io]
|
||||
hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043" }
|
||||
hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043" }
|
||||
hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043" }
|
||||
hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043" }
|
||||
hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043" }
|
||||
krilla = { git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043" }
|
||||
linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043" }
|
||||
hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b" }
|
||||
hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b" }
|
||||
hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b" }
|
||||
hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b" }
|
||||
hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b" }
|
||||
krilla = { git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b" }
|
||||
linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b" }
|
||||
ecolor = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" }
|
||||
emath = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" }
|
||||
epaint = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" }
|
||||
|
||||
@@ -27,7 +27,7 @@ log = { workspace = true }
|
||||
# `wgpu` pulls egui-wgpu's defaults: WebGPU plus the WebGL2 fallback.
|
||||
eframe = { workspace = true, features = ["default_fonts", "wgpu", "accesskit"] }
|
||||
# The page command API (storytold/craft-libs#413): the request plumbing behind window.vectorcraft.
|
||||
craft-web-api = { git = "https://github.com/storytold/craft-libs", rev = "4bed21baaa41d2b47bef90879c04df521f6f6043", version = "0.1.0" }
|
||||
craft-web-api = { git = "https://github.com/storytold/craft-libs", rev = "6fcf61c816c399508a60c7029a59e2c7b6139e0b", version = "0.1.0" }
|
||||
|
||||
wasm-bindgen = "0.2"
|
||||
serde_json = { workspace = true }
|
||||
|
||||
@@ -52,7 +52,7 @@ pub fn control_bar(app: &mut VectorcraftApp, ui: &mut Ui) -> bool {
|
||||
if tool == "box3d" {
|
||||
let shapes: [Choice; 6] =
|
||||
[("box3d", "3D Box"), ("rectangle", "Rectangle"), ("ellipse", "Ellipse"), ("polygon", "Polygon"), ("star", "Star"), ("spiral", "Spiral")]
|
||||
.map(|(id, label)| (id, label, shape_icon(id)));
|
||||
.map(|(id, label)| (id, label, icon_for_shape(id)));
|
||||
if let Some(shape) = choice(ui, "Shape", &active_shape, &shapes) {
|
||||
app.run("tool.setOption", json!({ "key": "shape", "value": shape })).ok();
|
||||
}
|
||||
@@ -309,7 +309,7 @@ fn draw_polygon_controls(app: &mut VectorcraftApp, ui: &mut Ui, opts: &Value, ac
|
||||
end_deg = a1;
|
||||
mode = mode_str(arc_mode);
|
||||
}
|
||||
let kinds: [Choice; 2] = [("polygon", "Polygon", shape_icon("polygon")), ("star", "Star", shape_icon("star"))];
|
||||
let kinds: [Choice; 2] = [("polygon", "Polygon", icon_for_shape("polygon")), ("star", "Star", icon_for_shape("star"))];
|
||||
match choice(ui, "Shape", if is_star { "star" } else { "polygon" }, &kinds) {
|
||||
Some("star") => apply_shape(app, &[("polyIsStar", json!(true))], json!({ "isStar": true, "spokeRatio": spoke })),
|
||||
Some(_) => apply_shape(app, &[("polyIsStar", json!(false))], json!({ "isStar": false })),
|
||||
@@ -410,7 +410,7 @@ fn draw_box3d_controls(app: &mut VectorcraftApp, ui: &mut Ui, opts: &Value, sele
|
||||
}
|
||||
|
||||
/// The toolbar icon of the shape tool `id`, so the Control bar's shape buttons show the same icon.
|
||||
fn shape_icon(id: &str) -> &'static str {
|
||||
fn icon_for_shape(id: &str) -> &'static str {
|
||||
vectorcraft_tools::tool_info(id).map_or("square-dashed", |t| crate::icons::tool_icon(t.icon))
|
||||
}
|
||||
|
||||
@@ -428,7 +428,7 @@ mod tests {
|
||||
use craft::behavior::IconId;
|
||||
use craft::ui::primitives::{has_icon, register_app_icons};
|
||||
|
||||
use super::shape_icon;
|
||||
use super::icon_for_shape;
|
||||
|
||||
/// The Control bar's shape buttons look their icons up by tool id; an id that names no tool
|
||||
/// would show the placeholder instead of the toolbar's icon.
|
||||
@@ -437,9 +437,9 @@ mod tests {
|
||||
register_app_icons(&crate::icons::APP_ICONS);
|
||||
for id in ["box3d", "rectangle", "ellipse", "polygon", "star", "spiral"] {
|
||||
let tool = vectorcraft_tools::tool_info(id).unwrap_or_else(|| panic!("{id} is a tool"));
|
||||
assert_eq!(shape_icon(id), crate::icons::tool_icon(tool.icon), "{id}");
|
||||
assert!(has_icon(&IconId::new(shape_icon(id))), "{id}'s icon {} isn't an icon", shape_icon(id));
|
||||
assert_eq!(icon_for_shape(id), crate::icons::tool_icon(tool.icon), "{id}");
|
||||
assert!(has_icon(&IconId::new(icon_for_shape(id))), "{id}'s icon {} isn't an icon", icon_for_shape(id));
|
||||
}
|
||||
assert_eq!(shape_icon("no-such-tool"), "square-dashed");
|
||||
assert_eq!(icon_for_shape("no-such-tool"), "square-dashed");
|
||||
}
|
||||
}
|
||||
@@ -76,17 +76,19 @@ pub struct CanvasDropsStyle {
|
||||
}
|
||||
|
||||
/// A drop target for one payload type `P`: `make` turns the payload into the canvas's own, or refuses it. `seen` is
|
||||
/// the operation of the last payload it accepted at the pointer.
|
||||
/// the operation of the last payload it accepted at the pointer. Where `covered` (another window lies over the canvas),
|
||||
/// it takes nothing: that window's targets take the drop.
|
||||
struct Target<'a, F> {
|
||||
rect: Rect,
|
||||
view: &'a CanvasView,
|
||||
covered: &'a dyn Fn(Pos2) -> bool,
|
||||
make: F,
|
||||
seen: Cell<Option<DropOperation>>,
|
||||
}
|
||||
|
||||
impl<'a, F> Target<'a, F> {
|
||||
fn new(rect: Rect, view: &'a CanvasView, make: F) -> Self {
|
||||
Target { rect, view, make, seen: Cell::new(None) }
|
||||
fn new(rect: Rect, view: &'a CanvasView, covered: &'a dyn Fn(Pos2) -> bool, make: F) -> Self {
|
||||
Target { rect, view, covered, make, seen: Cell::new(None) }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,6 +96,9 @@ impl<P: ?Sized, F: Fn(&P) -> Option<Payload>> DropTarget<P> for Target<'_, F> {
|
||||
type Drop = Dropped;
|
||||
|
||||
fn accept(&self, payload: &P, at: Pos2, op: DropOperation) -> Option<Dropped> {
|
||||
if (self.covered)(at) {
|
||||
return None;
|
||||
}
|
||||
let payload = (self.make)(payload)?;
|
||||
self.seen.set(Some(op));
|
||||
Some(Dropped { payload, at: self.view.to_doc(at), zoom: self.view.zoom, op })
|
||||
@@ -121,6 +126,8 @@ pub(crate) struct CanvasDrops<'a> {
|
||||
/// has the content the move started from ([`CarriedArt::before`]), and the document a tab rest showed is still the
|
||||
/// current one.
|
||||
given_up: bool,
|
||||
/// Whether another window lies over the canvas at a point of it: a floating panel's OS window.
|
||||
covered: &'a dyn Fn(Pos2) -> bool,
|
||||
out: &'a RefCell<Option<Dropped>>,
|
||||
/// The files from the OS the canvas places, and where their drop goes.
|
||||
files: (CanvasFiles<'a>, &'a RefCell<Option<CanvasDrop>>),
|
||||
@@ -150,9 +157,9 @@ impl Component for CanvasDrops<'_> {
|
||||
|
||||
fn update(&mut self, cx: &mut Cx<'_, Self>) {
|
||||
let rect = cx.rect;
|
||||
let (sources, given_up, view) = (&self.sources, self.given_up, &self.view);
|
||||
let (sources, given_up, view, covered) = (&self.sources, self.given_up, &self.view, self.covered);
|
||||
let unchanged = |a: &CarriedArt| given_up || sources.contains(&(a.document, a.revision));
|
||||
let art = Target::new(rect, view, |a: &CarriedArt| unchanged(a).then(|| Payload::Art(a.clone())));
|
||||
let art = Target::new(rect, view, covered, |a: &CarriedArt| unchanged(a).then(|| Payload::Art(a.clone())));
|
||||
let mut dropped = cx.drop_target::<CarriedArt, _>(&art);
|
||||
if self.kind == BodyKind::Pane
|
||||
&& let (Some(op), Some((carried, _))) = (art.seen.get(), cx.dragging::<CarriedArt>())
|
||||
@@ -163,11 +170,11 @@ impl Component for CanvasDrops<'_> {
|
||||
}
|
||||
if self.kind == BodyKind::Live {
|
||||
// The art of this canvas's own document is not accepted as a panel payload: its move resumes.
|
||||
let panel = Target::new(rect, view, |p: &PanelDrag| (!matches!(p, PanelDrag::Art { .. })).then(|| Payload::Panel(p.clone())));
|
||||
let style = Target::new(rect, view, |d: &ListDrag<StyleKey>| Some(Payload::Style(d.grabbed.clone())));
|
||||
let symbol = Target::new(rect, view, |d: &ListDrag<SymbolKey>| Some(Payload::Symbol(d.grabbed.clone())));
|
||||
let brush = Target::new(rect, view, |d: &ListDrag<BrushKey>| Some(Payload::Brush(d.grabbed.clone())));
|
||||
let library = Target::new(rect, view, |d: &ListDrag<LibraryKey>| Some(Payload::Library(d.grabbed.clone())));
|
||||
let panel = Target::new(rect, view, covered, |p: &PanelDrag| (!matches!(p, PanelDrag::Art { .. })).then(|| Payload::Panel(p.clone())));
|
||||
let style = Target::new(rect, view, covered, |d: &ListDrag<StyleKey>| Some(Payload::Style(d.grabbed.clone())));
|
||||
let symbol = Target::new(rect, view, covered, |d: &ListDrag<SymbolKey>| Some(Payload::Symbol(d.grabbed.clone())));
|
||||
let brush = Target::new(rect, view, covered, |d: &ListDrag<BrushKey>| Some(Payload::Brush(d.grabbed.clone())));
|
||||
let library = Target::new(rect, view, covered, |d: &ListDrag<LibraryKey>| Some(Payload::Library(d.grabbed.clone())));
|
||||
let panel = cx.drop_target::<PanelDrag, _>(&panel);
|
||||
let style = cx.drop_target::<ListDrag<StyleKey>, _>(&style);
|
||||
let symbol = cx.drop_target::<ListDrag<SymbolKey>, _>(&symbol);
|
||||
@@ -215,8 +222,10 @@ pub(crate) fn show(app: &mut VectorcraftApp, ui: &mut Ui, win: Win, kind: BodyKi
|
||||
&& app.session.documents().iter().any(|d| d.uid == a.document && d.same_content(&a.before))
|
||||
});
|
||||
let (out, files_out) = (RefCell::new(None), RefCell::new(None));
|
||||
let ctx = ui.ctx().clone();
|
||||
let covered = |at: Pos2| crate::panel_docking::os_window_at(app, &ctx, at);
|
||||
let files = (CanvasFiles::new(app, rect, &view), &files_out);
|
||||
let drops = CanvasDrops { common: Common::new(), view, kind, document, sources, given_up, out: &out, files };
|
||||
let drops = CanvasDrops { common: Common::new(), view, kind, document, sources, given_up, covered: &covered, out: &out, files };
|
||||
drops.id_salt(("canvas-drops", win)).show_at(ui, rect);
|
||||
if let Some(files) = files_out.take() {
|
||||
crate::place::canvas_drop(app, ui.ctx(), files);
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
use craft::behavior::IconId;
|
||||
use craft::ui::buttons::Button;
|
||||
use craft::ui::contract::{Bind, Props as _, Show as _, ShowContainer as _};
|
||||
use craft::ui::display::Text;
|
||||
use craft::ui::layout_components::Row;
|
||||
use craft::ui::buttons::{Button, ControlPlace, LinkLook};
|
||||
use craft::ui::contract::{Bind, Gap, Props as _, Show as _, ShowContainer as _};
|
||||
use craft::ui::display::{Shade, Text};
|
||||
use craft::ui::layout_components::{Row, Stack};
|
||||
use craft::ui::runtime::env::{Overrides, with_env};
|
||||
use craft::ui::shell::{RecentFile, StartAction, StartLayout, StartLink, StartScreen, Template};
|
||||
use craft::ui::style::TypeRole;
|
||||
|
||||
use super::{Ui, VectorcraftApp, json};
|
||||
|
||||
@@ -40,7 +42,11 @@ pub(super) fn home(app: &mut VectorcraftApp, ui: &mut Ui, rect: egui::Rect) {
|
||||
let mut pressed = None;
|
||||
let mut learn = |ui: &mut Ui| learn(app, ui, &mut pressed);
|
||||
let mut child = ui.new_child(egui::UiBuilder::new().max_rect(rect).layout(egui::Layout::top_down(egui::Align::Min)));
|
||||
let out = StartScreen::new(Bind::bound(&mut view), Bind::bound(&mut sort), &recent)
|
||||
// Production's community links read in the accent alone, with no underline.
|
||||
let plain_links = |overrides: &mut Overrides| {
|
||||
overrides.values.set(LinkLook::Plain);
|
||||
};
|
||||
let start = StartScreen::new(Bind::bound(&mut view), Bind::bound(&mut sort), &recent)
|
||||
.layout(StartLayout::Column)
|
||||
.title(tl!("Welcome to VectorCraft"))
|
||||
.subtitle(tl!("Vector illustration — fast, open, scriptable."))
|
||||
@@ -51,8 +57,8 @@ pub(super) fn home(app: &mut VectorcraftApp, ui: &mut Ui, rect: egui::Rect) {
|
||||
.templates_title(tl!("Quickly start a new file"))
|
||||
.links(&links)
|
||||
.links_title(tl!("Community"))
|
||||
.app_section(tl!("Learn"), &mut learn)
|
||||
.show(&mut child);
|
||||
.app_section(tl!("Learn"), &mut learn);
|
||||
let out = with_env(&mut child, plain_links, |ui| start.show(ui));
|
||||
app.ui.home_view = view;
|
||||
app.ui.home_sort = sort;
|
||||
for action in out.actions {
|
||||
@@ -87,20 +93,30 @@ fn run_action(app: &mut VectorcraftApp, action: StartAction) {
|
||||
}
|
||||
|
||||
/// The Home screen's Learn section: the Quick skill guide card, which shows the Learn panel's list
|
||||
/// of skills, and the Learn panel's tutorials under their skills, each a button that shows the
|
||||
/// panel at its steps (`learn.show`). The start screen may run this twice in a pass, so it only
|
||||
/// draws and records the tutorial pressed in `pressed`.
|
||||
/// of skills, and the Learn panel's tutorials under their skills (each title dim over its tutorials), each a button
|
||||
/// that shows the panel at its steps (`learn.show`), as tall as New and Open and a page heading's gap apart, as
|
||||
/// production spaced them. The start screen may run this twice in a pass, so it only draws and records the tutorial
|
||||
/// pressed in `pressed`.
|
||||
fn learn(app: &mut VectorcraftApp, ui: &mut Ui, pressed: &mut Option<&'static str>) {
|
||||
use crate::panels::learn::{catalog, guide_card};
|
||||
guide_card(app, ui); // PLAN: assumed `guide_card(app, ui)` as document-panels-w18 leaves it, on `Button::detail`.
|
||||
for skill in catalog::SKILLS {
|
||||
let _ = Text::new(skill.title).show(ui);
|
||||
let _ = Row::new().show(ui, |ui, _| {
|
||||
for tutorial in skill.tutorials {
|
||||
if Button::new(tutorial.title).id_salt(tutorial.id).show(ui).clicked() {
|
||||
*pressed = Some(tutorial.id);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
let _ = Stack::new().gap(Gap::PageHeading).fill_width().show(ui, |ui, _| {
|
||||
guide_card(app, ui); // PLAN: assumed `guide_card(app, ui)` as document-panels-w18 leaves it, on `Button::detail`.
|
||||
for skill in catalog::SKILLS {
|
||||
let _ = Stack::new().gap(Gap::Stack).fill_width().show(ui, |ui, _| {
|
||||
let _ = Text::new(skill.title).role(TypeRole::Label).shade(Shade::Muted).show(ui);
|
||||
let place = |overrides: &mut Overrides| {
|
||||
overrides.values.set(ControlPlace::PageAction);
|
||||
};
|
||||
let _ = with_env(ui, place, |ui| {
|
||||
Row::new().show(ui, |ui, _| {
|
||||
for tutorial in skill.tutorials {
|
||||
if Button::new(tutorial.title).id_salt(tutorial.id).show(ui).clicked() {
|
||||
*pressed = Some(tutorial.id);
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
//! dialogs live on the dialog host; [`pump`] reads their answers.
|
||||
|
||||
use craft::ui::contract::Bind;
|
||||
use craft::ui::dialog::{DialogResult, PromptChoice, StandardPrompt, StartupStage, dialog_id};
|
||||
use craft::ui::dialog::{DialogResult, PromptChoice, StandardPrompt, dialog_id};
|
||||
use craft::ui::patterns::form_dialogs::{DialogFields, FieldValue, HostedParamDialog, Param, ParamDialog, ParamKind};
|
||||
use serde_json::{Value, json};
|
||||
use vectorcraft_plugins::safe_mode::{self, Item};
|
||||
@@ -239,9 +239,10 @@ fn pump_stopped(app: &mut VectorcraftApp, ctx: &egui::Context) {
|
||||
let Some(dialogs) = app.dialogs() else { return };
|
||||
let answered = dialogs.with(|h| {
|
||||
let answered = h.take::<StandardPrompt>();
|
||||
// An empty host has neither an open dialog nor a queued one: otherwise the choice waits.
|
||||
// An empty host has neither an open dialog nor a queued one: otherwise the choice waits. It opens now rather
|
||||
// than through the startup queue, which the host drains only in its next pass: a frame may have no other.
|
||||
if answered.is_none() && h.is_empty() {
|
||||
h.enqueue(StartupStage::Warning, stopped_prompt(&fields));
|
||||
h.open(stopped_prompt(&fields));
|
||||
ctx.request_repaint();
|
||||
}
|
||||
answered
|
||||
|
||||
@@ -27,6 +27,8 @@ struct Window {
|
||||
frames: usize,
|
||||
/// The texts its last frame drew, with their rects in the window.
|
||||
texts: Vec<(String, Rect)>,
|
||||
/// The named nodes of its last frame's access tree, with their rects in the window.
|
||||
nodes: Vec<(String, Rect)>,
|
||||
}
|
||||
|
||||
struct Host {
|
||||
@@ -77,6 +79,7 @@ impl Host {
|
||||
dropped: Vec::new(),
|
||||
frames: 0,
|
||||
texts: Vec::new(),
|
||||
nodes: Vec::new(),
|
||||
});
|
||||
let viewports = host.infos();
|
||||
let (time, focused) = (host.time, host.focus == id);
|
||||
@@ -105,9 +108,16 @@ impl Host {
|
||||
}
|
||||
let mut shown = Vec::new();
|
||||
full.shapes.iter().for_each(|c| texts(&c.shape, &mut shown));
|
||||
let nodes = full.platform_output.accesskit_update.as_ref().map_or_else(Vec::new, |update| {
|
||||
let rect = |b: egui::accesskit::Rect| Rect::from_min_max(pos2(b.x0 as f32, b.y0 as f32), pos2(b.x1 as f32, b.y1 as f32));
|
||||
update.nodes.iter().filter_map(|(_, node)| Some((node.label()?.to_string(), rect(node.bounds()?)))).collect()
|
||||
});
|
||||
let mut host = host.borrow_mut();
|
||||
if let Some(window) = host.windows.get_mut(&id) {
|
||||
window.texts = shown;
|
||||
if !nodes.is_empty() {
|
||||
window.nodes = nodes;
|
||||
}
|
||||
}
|
||||
host.apply(&full);
|
||||
}
|
||||
@@ -317,6 +327,7 @@ fn button(pos: Pos2, pressed: bool) -> Event {
|
||||
#[test]
|
||||
fn art_dragged_from_the_canvas_onto_a_native_panel_window_drops_there() {
|
||||
let mut h = Harness::new();
|
||||
h.ctx.enable_accesskit();
|
||||
let id = h.app.run("shape.rectangle", json!({"x": 10, "y": 10, "width": 50, "height": 40})).unwrap()["id"].as_u64().unwrap();
|
||||
let id = vectorcraft_doc::NodeId(id);
|
||||
let viewport = h.float("graphicStyles");
|
||||
@@ -327,8 +338,14 @@ fn art_dragged_from_the_canvas_onto_a_native_panel_window_drops_there() {
|
||||
let before = art(&h);
|
||||
let view = h.app.canvas_view().expect("the canvas was drawn");
|
||||
let from = view.to_screen(vectorcraft_geom::Point::new(35.0, 30.0));
|
||||
let window = h.host.borrow().windows.get(&viewport).map(|w| w.rect).unwrap();
|
||||
let to = window.min + vec2(60.0, 120.0) - ORIGIN.to_vec2();
|
||||
// The first style's tile, found by its name: the panel takes art dropped onto a style or between styles.
|
||||
let first = h.app.session.active().unwrap().doc.graphic_styles[0].name.clone();
|
||||
let to = {
|
||||
let host = h.host.borrow();
|
||||
let window = &host.windows[&viewport];
|
||||
let tile = window.nodes.iter().find(|(name, _)| *name == first).map(|(_, r)| *r).expect("the first style's tile");
|
||||
window.rect.min + tile.center().to_vec2() - ORIGIN.to_vec2()
|
||||
};
|
||||
assert!(view.rect.contains(to), "the window lies over the canvas");
|
||||
h.frame(vec![Event::PointerMoved(from), button(from, true)]);
|
||||
for k in 1..=8 {
|
||||
|
||||
@@ -62,6 +62,15 @@ impl Harness {
|
||||
.map(|b| Rect::from_min_max(pos2(b.x0 as f32, b.y0 as f32), pos2(b.x1 as f32, b.y1 as f32)))
|
||||
}
|
||||
|
||||
/// The centre of the text field named `label` in the last frame.
|
||||
fn text_field(&self, label: &str) -> Option<Pos2> {
|
||||
self.nodes
|
||||
.iter()
|
||||
.filter(|(_, n)| n.role() == egui::accesskit::Role::TextInput && n.label() == Some(label))
|
||||
.find_map(|(_, n)| n.bounds())
|
||||
.map(|b| pos2(((b.x0 + b.x1) / 2.0) as f32, ((b.y0 + b.y1) / 2.0) as f32))
|
||||
}
|
||||
|
||||
fn tab(&self, panel: &str) -> Option<Rect> {
|
||||
self.named(panel, egui::accesskit::Role::Tab)
|
||||
}
|
||||
@@ -679,6 +688,9 @@ fn ui_docking_reports_the_layout_and_the_dock_state() {
|
||||
h.frame(vec![]);
|
||||
let tab = h.tab("layers").unwrap();
|
||||
h.click(tab.center());
|
||||
// A press on a tab leaves the keys where they were (the dock's TabStrip::keeps_focus); a click in the panel's
|
||||
// search field gives the panel the keys.
|
||||
h.click(h.text_field("Search layers").expect("the Layers panel's search field"));
|
||||
let report = inspect(&h.app, &h.ctx);
|
||||
assert_eq!(report["layout"], serde_json::to_value(h.layout()).unwrap());
|
||||
assert_eq!(report["focused"], json!("layers"));
|
||||
@@ -838,13 +850,7 @@ fn other_function_keys_and_keyboard_guards_keep_their_routes() {
|
||||
// The Layers panel's search field, clicked once the dialog has gone: it has the keys until a click on the canvas
|
||||
// takes them.
|
||||
h.frames(2);
|
||||
let field = h
|
||||
.nodes
|
||||
.iter()
|
||||
.filter(|(_, n)| n.role() == egui::accesskit::Role::TextInput && n.label() == Some("Search layers"))
|
||||
.find_map(|(_, n)| n.bounds())
|
||||
.map(|b| pos2(((b.x0 + b.x1) / 2.0) as f32, ((b.y0 + b.y1) / 2.0) as f32))
|
||||
.expect("the Layers panel's search field");
|
||||
let field = h.text_field("Search layers").expect("the Layers panel's search field");
|
||||
h.click(field);
|
||||
h.f7();
|
||||
assert!(showing(&h.app.ui, "layers"), "F7 does nothing while a text field has focus");
|
||||
|
||||
@@ -7,7 +7,7 @@ use craft::behavior::IconId;
|
||||
use craft::keymap::CommandRef;
|
||||
use craft::ui::bars::{BarItem, BarItems};
|
||||
use craft::ui::buttons::{IconButton, PopupMark, ToggleButton};
|
||||
use craft::ui::contract::{Bind, PopupKind, Props as _, Show as _, ShowContainer as _, Trigger};
|
||||
use craft::ui::contract::{Bind, Gap, PopupKind, Props as _, Show as _, ShowContainer as _, Trigger};
|
||||
use craft::ui::display::Divider;
|
||||
use craft::ui::layout_components::Row;
|
||||
use craft::ui::menu::{Menu, MenuItem, PanelRow};
|
||||
@@ -498,20 +498,13 @@ pub(crate) fn run_align_to(app: &mut VectorcraftApp, v: AlignTo) -> Result<Value
|
||||
/// Spacing with its value and Align To. The buttons are commands, so their state and clicks come
|
||||
/// from the command layer ([`button_enabled`], [`run_button`]).
|
||||
pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) {
|
||||
crate::panels::subheading(tl!("Align Objects:")).show(ui, |ui, _| {
|
||||
Row::new().show(ui, |ui, _| {
|
||||
for (icon, b) in align_icons() {
|
||||
command_button(ui, icon, b);
|
||||
}
|
||||
});
|
||||
});
|
||||
crate::panels::subheading(tl!("Distribute Objects:")).show(ui, |ui, _| {
|
||||
Row::new().show(ui, |ui, _| {
|
||||
for (icon, b) in distribute_icons() {
|
||||
command_button(ui, icon, b);
|
||||
}
|
||||
});
|
||||
});
|
||||
// The reference app set the buttons apart in groups: left / centre / right of Align Objects
|
||||
// around the both-axes button, and the vertical and horizontal halves of Distribute Objects.
|
||||
let align: Vec<_> = align_icons().collect();
|
||||
crate::panels::subheading(tl!("Align Objects:")).show(ui, |ui, _| button_groups(ui, &[&align[..3], &align[3..4], &align[4..]]));
|
||||
Divider::horizontal().show(ui);
|
||||
let distribute: Vec<_> = distribute_icons().collect();
|
||||
crate::panels::subheading(tl!("Distribute Objects:")).show(ui, |ui, _| button_groups(ui, &[&distribute[..3], &distribute[3..]]));
|
||||
if part_hidden(app, HIDE_OPTIONS) {
|
||||
return;
|
||||
}
|
||||
@@ -524,30 +517,47 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) {
|
||||
let lengths = crate::canvas::general_lengths(app);
|
||||
let min_spacing = spacing_min(app);
|
||||
let mut edited = None;
|
||||
crate::panels::subheading(tl!("Distribute Spacing:")).show(ui, |ui, _| {
|
||||
Row::new().show(ui, |ui, _| {
|
||||
command_button(ui, "dc-dist-vspace", Button::Spacing("vertical"));
|
||||
command_button(ui, "dc-dist-hspace", Button::Spacing("horizontal"));
|
||||
// The value is UI state, not a document edit: a landed value is assigned.
|
||||
let field = NumberField::length(tl!("Distribute Spacing"), Bind::given(Some(spacing)), lengths)
|
||||
.step(1.0)
|
||||
.range(min_spacing..=f64::INFINITY)
|
||||
.enabled(sent);
|
||||
edited = field.show(ui).edit.events.landed().cloned().flatten();
|
||||
// With one object selected the buttons align it to the artboard, and Align To shows Artboard.
|
||||
let anchor = key_is_anchor(app);
|
||||
// Distribute Spacing and Align To share a line, a rule between them, as the reference app had them.
|
||||
Row::new().gap(Gap::Section).show(ui, |ui, _| {
|
||||
crate::panels::subheading(tl!("Distribute Spacing:")).show(ui, |ui, _| {
|
||||
Row::new().show(ui, |ui, _| {
|
||||
command_button(ui, "dc-dist-vspace", Button::Spacing("vertical"));
|
||||
command_button(ui, "dc-dist-hspace", Button::Spacing("horizontal"));
|
||||
// The value is UI state, not a document edit: a landed value is assigned.
|
||||
let field = NumberField::length(tl!("Distribute Spacing"), Bind::given(Some(spacing)), lengths)
|
||||
.step(1.0)
|
||||
.range(min_spacing..=f64::INFINITY)
|
||||
.enabled(sent);
|
||||
edited = field.show(ui).edit.events.landed().cloned().flatten();
|
||||
});
|
||||
});
|
||||
Divider::vertical().show(ui);
|
||||
crate::panels::subheading(tl!("Align To:")).show(ui, |ui, _| {
|
||||
Row::new().show(ui, |ui, _| {
|
||||
for (id, v) in ALIGN_TO_COMMANDS {
|
||||
let (icon, _) = align_to_icon_name(v, anchor);
|
||||
ToggleButton::command(CommandRef::new(id)).icon(IconId::new(icon)).icon_only().show(ui);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
if let Some(v) = edited {
|
||||
app.ui.align_spacing = v;
|
||||
}
|
||||
crate::panels::subheading(tl!("Align To:")).show(ui, |ui, _| {
|
||||
// With one object selected the buttons align it to the artboard, and Align To shows Artboard.
|
||||
let anchor = key_is_anchor(app);
|
||||
Row::new().show(ui, |ui, _| {
|
||||
for (id, v) in ALIGN_TO_COMMANDS {
|
||||
let (icon, _) = align_to_icon_name(v, anchor);
|
||||
ToggleButton::command(CommandRef::new(id)).icon(IconId::new(icon)).icon_only().show(ui);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/// The command buttons of `groups` on one line, a section gap between the groups.
|
||||
fn button_groups(ui: &mut Ui, groups: &[&[(&'static str, Button)]]) {
|
||||
Row::new().gap(Gap::Section).show(ui, |ui, _| {
|
||||
for group in groups {
|
||||
Row::new().show(ui, |ui, _| {
|
||||
for (icon, b) in *group {
|
||||
command_button(ui, icon, *b);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -664,11 +664,12 @@ fn set_base(app: &mut VectorcraftApp) {
|
||||
}
|
||||
}
|
||||
|
||||
// The footer's actions, in order.
|
||||
// The footer's actions, in order: the limit at the start edge, the rest from the end edge, so they read Edit or
|
||||
// Apply, Save Selected, Save Group from left to right.
|
||||
const LIMIT: usize = 0;
|
||||
const EDIT: usize = 1;
|
||||
const SAVE_GROUP: usize = 1;
|
||||
const SAVE_SELECTED: usize = 2;
|
||||
const SAVE_GROUP: usize = 3;
|
||||
const EDIT: usize = 3;
|
||||
|
||||
/// The Limit to Library popup's rows: None, Document Swatches, then the colour libraries. → the
|
||||
/// key of the row that ran.
|
||||
@@ -722,11 +723,11 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) {
|
||||
.footer(|ui, _| {
|
||||
let actions = [
|
||||
FooterAction::new(icon("library"), tip.clone()).pressed(limited).popup(PopupKind::Menu),
|
||||
FooterAction::new(icon("palette"), tl!("Edit or Apply Colors").to_string()).enabled(doc),
|
||||
FooterAction::new(icon("dc-new-item"), tl!("Save selected colors as swatches").to_string()).enabled(has_cells),
|
||||
FooterAction::new(icon("dc-folder"), tl!("Save color group to Swatch panel").to_string()),
|
||||
FooterAction::new(icon("dc-new-item"), tl!("Save selected colors as swatches").to_string()).enabled(has_cells),
|
||||
FooterAction::new(icon("palette"), tl!("Edit or Apply Colors").to_string()).enabled(doc),
|
||||
];
|
||||
let out = FooterBar::actions(actions).show_footer(ui);
|
||||
let out = FooterBar::actions(actions).at_start(LIMIT + 1).show_footer(ui);
|
||||
footer_picked = out.picked;
|
||||
limit_picked = None;
|
||||
if let Some(button) = out.responses.get(LIMIT) {
|
||||
|
||||
@@ -78,12 +78,13 @@ impl View {
|
||||
}
|
||||
}
|
||||
|
||||
/// The thumbnail zoom that makes the browser's list rows small or large; `None` keeps the grid's own.
|
||||
fn list_zoom(self) -> Option<f64> {
|
||||
/// The thumbnail zoom of this view: the grid's tiles about 40 points, as production's, and the list rows small or
|
||||
/// large.
|
||||
fn zoom(self) -> f64 {
|
||||
match self {
|
||||
View::Thumbnail => None,
|
||||
View::SmallList => Some(0.5),
|
||||
View::LargeList => Some(2.0),
|
||||
View::Thumbnail => 5.0 / 6.0,
|
||||
View::SmallList => 0.5,
|
||||
View::LargeList => 2.0,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -468,9 +469,7 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) {
|
||||
let mut panel = std::mem::take(&mut app.ui.graphic_styles_panel);
|
||||
let looks = look_hashes(&mut panel, app);
|
||||
let view = app.ui.graphic_styles_view;
|
||||
if let Some(zoom) = view.list_zoom() {
|
||||
panel.state.zoom = zoom;
|
||||
}
|
||||
panel.state.zoom = view.zoom();
|
||||
let before = panel.selection.clone();
|
||||
let (alt, linked) = (alt_held(ui), app.session.selection_graphic_style().is_some());
|
||||
let thumbs = style_thumbs(app, &doc, &looks, panel.preview);
|
||||
|
||||
@@ -3,10 +3,11 @@
|
||||
//! drag, the Zoom tool's magnification, the Paintbrush's brush) and the selection's fill and
|
||||
//! stroke colour values.
|
||||
|
||||
use craft::behavior::ColumnWidth;
|
||||
use craft::keymap::CommandRef;
|
||||
use craft::ui::contract::{Show as _, ShowContainer as _};
|
||||
use craft::ui::display::{Divider, Picture, Shade, Text};
|
||||
use craft::ui::layout_components::{Row, Stack};
|
||||
use craft::ui::layout_components::{Grid, Row, Stack};
|
||||
use craft::ui::list::ThumbAspect;
|
||||
use craft::ui::menu::PanelRow;
|
||||
use craft::ui::runtime::commands::{CommandState, CommandStates};
|
||||
@@ -231,9 +232,13 @@ pub(crate) fn lines(app: &mut VectorcraftApp, ctx: &egui::Context) -> InfoLines
|
||||
}
|
||||
}
|
||||
|
||||
/// The panel's two columns of numbers: two equal halves of its width.
|
||||
const HALVES: &[ColumnWidth] = &[ColumnWidth::fill(1.0); 2];
|
||||
|
||||
pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) {
|
||||
let l = lines(app, ui.ctx());
|
||||
Row::new().show(ui, |ui, _| {
|
||||
// Two equal halves of the panel, as the reference app's columns were.
|
||||
let _ = Grid::new(HALVES).show(ui, |ui, _| {
|
||||
for column in [&l.left, &l.right] {
|
||||
Stack::new().show(ui, |ui, _| {
|
||||
for s in column {
|
||||
|
||||
@@ -2,7 +2,8 @@ use craft::behavior::IconId;
|
||||
use craft::keymap::Mods;
|
||||
use craft::layers::ui::panel::MenuTarget; // PLAN: assumed path of craft-layers' panel types
|
||||
use craft::layers::ui::tree::LayerRowKey;
|
||||
use craft::ui::contract::{Entry, ListDrag};
|
||||
use craft::ui::contract::{Entry, ListDrag, Show as _};
|
||||
use craft::ui::display::{Elide, Text};
|
||||
use craft::ui::menu::{MenuRow, PanelRow};
|
||||
use craft::ui::primitives::IconSpec;
|
||||
use craft::ui::runtime::commands::{CommandRef, CommandState, CommandStates};
|
||||
@@ -450,8 +451,9 @@ pub(crate) fn footer(tree: &DocLayers, ui: &mut Ui, out: &mut Vec<(String, Value
|
||||
.enabled(locate_ok),
|
||||
];
|
||||
let count = crate::i18n::tn(tree.doc().layers.len() as u64, "{n} Layer", "{n} Layers").to_string();
|
||||
// The count is a unit of the footer's row, centred on its buttons' line in the text ink.
|
||||
let (output, _) = FooterBar::actions(actions).at_start(0).show_footer_leading(ui, |ui, _| {
|
||||
ui.weak(&count);
|
||||
Text::new(count.clone()).elide(Elide::End).show(ui);
|
||||
});
|
||||
// The footer runs twice per pass: the sizing pass measures it and must report nothing.
|
||||
if ui.is_sizing_pass() {
|
||||
|
||||
@@ -27,7 +27,7 @@ use craft::ui::display::{Divider, Shade, Text};
|
||||
use craft::ui::layout_components::{Row, Stack};
|
||||
use craft::ui::list::{List, ListRow, ThumbAspect, ThumbSize};
|
||||
use craft::ui::menu::{Menu, MenuItem, PanelRow};
|
||||
use craft::ui::notices::{Notice, NoticeAction, NoticeLayout};
|
||||
use craft::ui::notices::{Notice, NoticeAction, NoticeIcon, NoticeLayout};
|
||||
use craft::ui::patterns::form_dialogs::{DialogFields, HostedParamDialog, Param, ParamDialog, ParamKind};
|
||||
use craft::ui::pickers::Select;
|
||||
use craft::ui::primitives::textures::{Priority, Revision, ThumbPaint, ThumbRender, ThumbRequest, ThumbSource, ThumbnailOptions, Thumbnails};
|
||||
@@ -791,6 +791,7 @@ fn no_library(ui: &mut Ui) -> bool {
|
||||
),
|
||||
)
|
||||
.title(tl!("Local Libraries"))
|
||||
.icon(NoticeIcon::Custom(IconSpec::svg(IconId::new("library"))))
|
||||
.layout(NoticeLayout::Centred)
|
||||
.action(NoticeAction::new(tl!("Create New Library")))
|
||||
.show(ui)
|
||||
|
||||
@@ -588,8 +588,8 @@ pub(crate) fn show_window(app: &mut VectorcraftApp, ctx: &egui::Context) {
|
||||
// PLAN: the zoom slider can set a zoom the five views do not name; it saves as the nearest of them.
|
||||
fn saved_view(view: PresetView, zoom: f64) -> View {
|
||||
match (view == PresetView::List, zoom) {
|
||||
(false, z) if z < 0.625 => View::SmallThumb,
|
||||
(false, z) if z < 0.875 => View::MediumThumb,
|
||||
(false, z) if z < 7.0 / 24.0 => View::SmallThumb,
|
||||
(false, z) if z < 0.5 => View::MediumThumb,
|
||||
(false, _) => View::LargeThumb,
|
||||
(true, z) if z < 0.75 => View::SmallList,
|
||||
(true, _) => View::LargeList,
|
||||
|
||||
@@ -76,6 +76,16 @@ pub(crate) fn menu_library_ids<K: LibraryKind>(app: &VectorcraftApp) -> Vec<Stri
|
||||
out
|
||||
}
|
||||
|
||||
/// A view picked in the browser saves as the view it is: the thresholds of `saved_view` lie between the zooms
|
||||
/// `View::preset` gives, so retuning one without the other would save another view.
|
||||
#[test]
|
||||
fn every_view_saves_as_itself() {
|
||||
for (view, _) in View::ALL {
|
||||
let (shown, zoom) = view.preset();
|
||||
assert_eq!(saved_view(shown, zoom), view);
|
||||
}
|
||||
}
|
||||
|
||||
fn undo_len(app: &VectorcraftApp) -> usize {
|
||||
app.session.doc().unwrap().history.undo.len()
|
||||
}
|
||||
|
||||
@@ -65,12 +65,13 @@ impl View {
|
||||
(View::SmallList, "Small List View"),
|
||||
(View::LargeList, "Large List View"),
|
||||
];
|
||||
/// The browser's view and thumbnail zoom this mode stands for.
|
||||
/// The browser's view and thumbnail zoom this mode stands for: thumbnails of about 12, 16 and 32 points on the
|
||||
/// 48-point large thumbnail, the 11, 15.5 and 30 point tiles of production.
|
||||
pub(crate) fn preset(self) -> (PresetView, f64) {
|
||||
match self {
|
||||
View::SmallThumb => (PresetView::Grid, 0.5),
|
||||
View::MediumThumb => (PresetView::Grid, 0.75),
|
||||
View::LargeThumb => (PresetView::Grid, 1.0),
|
||||
View::SmallThumb => (PresetView::Grid, 0.25),
|
||||
View::MediumThumb => (PresetView::Grid, 1.0 / 3.0),
|
||||
View::LargeThumb => (PresetView::Grid, 2.0 / 3.0),
|
||||
View::SmallList => (PresetView::List, 0.5),
|
||||
View::LargeList => (PresetView::List, 1.0),
|
||||
}
|
||||
@@ -751,6 +752,14 @@ fn popup(ui: &mut Ui, label: &'static str, opener: Option<&Response>, mut body:
|
||||
}
|
||||
}
|
||||
|
||||
// The footer's actions, in order.
|
||||
const LIBRARIES: usize = 0;
|
||||
const KINDS: usize = 1;
|
||||
const EDIT: usize = 2;
|
||||
const DELETE: usize = 3;
|
||||
const NEW: usize = 4;
|
||||
const NEW_GROUP: usize = 5;
|
||||
|
||||
/// The panel's footer: Swatch Libraries, Show Swatch Kinds, Edit Color Group or Swatch Options, New Color Group, New
|
||||
/// Swatch and Delete. Alt-click on Delete deletes without asking; Cmd/Ctrl-click on New Swatch makes a spot color, and
|
||||
/// Cmd/Ctrl+Shift-click a global process color. Swatches dragged from the list and dropped on New Swatch are
|
||||
@@ -763,31 +772,32 @@ fn footer(app: &mut VectorcraftApp, ui: &mut Ui) {
|
||||
let group = actions::selected_group(app, &sel).filter(|_| opts.is_none());
|
||||
let icon = |id: &'static str| IconSpec::svg(IconId::new(id));
|
||||
let rows_drag = |d: &PanelDrag| matches!(d, PanelDrag::Paint { rows: Some(_), .. });
|
||||
// The first action sits at the end edge.
|
||||
let edit = if group.is_some() {
|
||||
FooterAction::new(icon("palette"), tl!("Edit or Apply Color Group"))
|
||||
} else {
|
||||
FooterAction::new(icon("dc-options"), tl!("Swatch Options")).enabled(opts.is_some())
|
||||
};
|
||||
// Libraries, Show Swatch Kinds and the edit action sit at the start edge; Delete at the end edge, then New Swatch
|
||||
// and New Color Group before it.
|
||||
let actions = [
|
||||
FooterAction::new(icon("library"), SwatchLibraries::MENU).pressed(library_panel::any_open::<SwatchLibraries>(&app.ui)),
|
||||
FooterAction::new(icon("dc-swatch-kinds"), tl!("Show Swatch Kinds")).pressed(kind != Kind::All),
|
||||
edit,
|
||||
FooterAction::new(icon("trash-2"), tl!("Delete Swatch"))
|
||||
.enabled(!del.is_empty())
|
||||
.takes_drops_disabled(del.is_empty())
|
||||
.accepts_drops::<PanelDrag>(rows_drag),
|
||||
FooterAction::new(icon("dc-new-item"), tl!("New Swatch")).accepts_drops::<PanelDrag>(rows_drag),
|
||||
FooterAction::new(icon("dc-folder"), tl!("New Color Group")),
|
||||
edit,
|
||||
FooterAction::new(icon("dc-swatch-kinds"), tl!("Show Swatch Kinds")).pressed(kind != Kind::All),
|
||||
FooterAction::new(icon("library"), SwatchLibraries::MENU).pressed(library_panel::any_open::<SwatchLibraries>(&app.ui)),
|
||||
];
|
||||
let out = FooterBar::actions(actions).show_footer(ui);
|
||||
let out = FooterBar::actions(actions).at_start(EDIT + 1).show_footer(ui);
|
||||
match out.picked {
|
||||
Some(0) if !del.is_empty() => actions::delete(app, del, out.mods.alt),
|
||||
Some(1) => actions::new_swatch(app, &sel, out.mods),
|
||||
Some(2) => {
|
||||
Some(DELETE) if !del.is_empty() => actions::delete(app, del, out.mods.alt),
|
||||
Some(NEW) => actions::new_swatch(app, &sel, out.mods),
|
||||
Some(NEW_GROUP) => {
|
||||
app.run("ui.newColorGroup", json!({"swatches": del})).ok();
|
||||
}
|
||||
Some(3) => match (group, opts) {
|
||||
Some(EDIT) => match (group, opts) {
|
||||
(Some(g), _) => actions::edit_group(app, &g),
|
||||
(None, Some(n)) => {
|
||||
app.run("ui.swatchOptions", json!({"name": n})).ok();
|
||||
@@ -800,19 +810,19 @@ fn footer(app: &mut VectorcraftApp, ui: &mut Ui) {
|
||||
&& let Some(drag) = drop.payload::<PanelDrag>()
|
||||
{
|
||||
match drop.index {
|
||||
0 => dnd::on_footer_drop(app, dnd::FooterTarget::Delete, drag),
|
||||
1 => dnd::on_footer_drop(app, dnd::FooterTarget::New, drag),
|
||||
DELETE => dnd::on_footer_drop(app, dnd::FooterTarget::Delete, drag),
|
||||
NEW => dnd::on_footer_drop(app, dnd::FooterTarget::New, drag),
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
popup(ui, tl!("Show Swatch Kinds"), out.responses.get(4), |ui| {
|
||||
popup(ui, tl!("Show Swatch Kinds"), out.responses.get(KINDS), |ui| {
|
||||
for (k, label) in Kind::ALL {
|
||||
if item(ui, label, true, Some(k == kind)) {
|
||||
app.ui.swatches_panel.kind = k;
|
||||
}
|
||||
}
|
||||
});
|
||||
popup(ui, tl!("Swatch Libraries"), out.responses.get(5), |ui| {
|
||||
popup(ui, tl!("Swatch Libraries"), out.responses.get(LIBRARIES), |ui| {
|
||||
ui.set_min_width(200.0);
|
||||
library_panel::library_menu::<SwatchLibraries>(app, ui);
|
||||
});
|
||||
|
||||
@@ -36,3 +36,12 @@ fn the_color_wheel_box_and_its_strip_stay_inside_the_panel() {
|
||||
assert!(strip.height() <= field.height(), "the strip {strip:?} is taller than the box {field:?}");
|
||||
assert!(field.right() <= ROOM.x && strip.right() <= ROOM.x, "the box {field:?} or its strip {strip:?} runs past the panel");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn align_to_shares_the_distribute_spacing_line_inside_the_align_panel() {
|
||||
let panel = Panel::new(app_with_rect(), align::show);
|
||||
let (field, to) = (panel.rect("Distribute Spacing"), panel.rect("Align to Artboard"));
|
||||
assert!(to.left() > field.right(), "Align To at {to:?} is not beside the spacing field {field:?}");
|
||||
assert!((field.top()..=field.bottom()).contains(&to.center().y), "Align To at {to:?} is off the spacing field's line {field:?}");
|
||||
assert!(to.right() <= ROOM.x, "Align To at {to:?} runs past the panel");
|
||||
}
|
||||
@@ -16,7 +16,7 @@ use craft::keymap::CommandRef;
|
||||
use craft::ui::buttons::IconButton;
|
||||
use craft::ui::choice::Checkbox;
|
||||
use craft::ui::contract::{Bind, Entry, GlyphLabel, LabelKind, LabelPress, Props, Show, ShowContainer, SideLabel, Sizing};
|
||||
use craft::ui::display::{Shade, Text};
|
||||
use craft::ui::display::{Divider, Shade, Text};
|
||||
use craft::ui::form::Field;
|
||||
use craft::ui::layout_components::Row;
|
||||
use craft::ui::menu::PanelRow;
|
||||
@@ -576,18 +576,21 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) {
|
||||
IconButton::command(IconId::new("flip-vertical-2"), FLIP_HORIZONTAL).show(ui);
|
||||
IconButton::command(IconId::new("flip-horizontal-2"), FLIP_VERTICAL).show(ui);
|
||||
});
|
||||
// Live shape properties (a path with live corners is no shape).
|
||||
// Live shape properties (a path with live corners is no shape), ruled off from the fields as the options are.
|
||||
if let Some(n) = first_selected(app)
|
||||
&& let NodeKind::Path { live: Some(live), .. } = &n.kind
|
||||
&& !matches!(**live, LiveShape::Path { .. })
|
||||
&& !live_shape_rows(app, ui, &n, live, true)
|
||||
{
|
||||
Text::new(tl!("Shape Properties:")).show(ui);
|
||||
Text::new(tl!(n.kind_label())).shade(Shade::Muted).show(ui);
|
||||
Divider::horizontal().show(ui);
|
||||
if !live_shape_rows(app, ui, &n, live, true) {
|
||||
Text::new(tl!("Shape Properties:")).show(ui);
|
||||
Text::new(tl!(n.kind_label())).shade(Shade::Muted).show(ui);
|
||||
}
|
||||
}
|
||||
if part_hidden(app, HIDE_OPTIONS_KEY) {
|
||||
return;
|
||||
}
|
||||
Divider::horizontal().show(ui);
|
||||
let (sc, ss) = (app.session.prefs.scale_corners, app.session.prefs.scale_strokes);
|
||||
option_check(app, ui, tl!("Scale Corners"), "scaleCorners", sc);
|
||||
option_check(app, ui, tl!("Scale Strokes & Effects"), "scaleStrokes", ss);
|
||||
|
||||
+27
-10
@@ -147,18 +147,31 @@ pub fn root_theme(prefs: &Prefs) -> (ThemeId, ModeChoice, Option<Rgba>) {
|
||||
|
||||
/// The app's sizes over the framework's size sets (`sizes.json`): push buttons have the app's 4-point corners
|
||||
/// where the sets give pills, the Home title is 26-point under 60 points of page margin with a 36-point call to
|
||||
/// action, and the compact set takes the reference app's metrics:
|
||||
/// 26-point fields and spinners, 24-point push buttons, 10 points inside panels, 5 between rows, 13-point body type
|
||||
/// with 12.5-point labels and 11-point captions, 16-point glyphs in icon buttons, 5-point control corners, 8-point
|
||||
/// menus and 10-point windows, 33-point panel tabs, 310-point dock columns with 14-point column bars and 38-point
|
||||
/// icon columns.
|
||||
/// action, Home keeps production's rhythm (its item spacing of 5 plus the room it added: 9 from title to subtitle, 27
|
||||
/// to New and Open, 28-point New and Open with 16 points beside their labels and 14 between them, 33 between sections,
|
||||
/// 15 under a heading, 24-point link rows 5 apart), and the compact set takes the reference app's metrics:
|
||||
/// 26-point fields and spinners, 24-point push buttons, 10 points inside panels, 5 between rows, 16-point glyphs in
|
||||
/// icon buttons, 5-point control corners, 8-point menus and 10-point windows, 33-point panel tabs, 310-point dock
|
||||
/// columns with 14-point column bars and 38-point icon columns, 29-point menu rows, and dialogs 22 points inside their
|
||||
/// edge with 28-point buttons at least 72 points wide.
|
||||
/// Its type is the size the reference app draws: it set Inter at 92% of its nominal 13-point body, 12.5-point labels
|
||||
/// and 11.5-point captions, so they read at 12, 11.5 and 10.5 points, on the rows those nominal sizes gave.
|
||||
const SIZES: &[u8] = br#"{
|
||||
"all": {
|
||||
"radius.button": 4,
|
||||
"typography.display.size": 26,
|
||||
"typography.display.line_height": 32,
|
||||
"size.page.margin": 60,
|
||||
"size.page.action": 36
|
||||
"size.page.action": 36,
|
||||
"size.page.button": 28,
|
||||
"size.page.button_side": 16,
|
||||
"size.page.gap.title": 9,
|
||||
"size.page.gap.lead": 27,
|
||||
"size.page.gap.actions": 14,
|
||||
"size.page.gap.section": 33,
|
||||
"size.page.gap.heading": 15,
|
||||
"size.page.gap.link": 5,
|
||||
"size.page.link": 24
|
||||
},
|
||||
"compact": {
|
||||
"size.control.md": 26,
|
||||
@@ -175,13 +188,17 @@ const SIZES: &[u8] = br#"{
|
||||
"radius.control": 5,
|
||||
"radius.surface": 8,
|
||||
"radius.window": 10,
|
||||
"typography.body.size": 13,
|
||||
"size.dialog.button": 72,
|
||||
"size.dialog.button_height": 28,
|
||||
"size.row.menu": 29,
|
||||
"space.pad.dialog": 22,
|
||||
"typography.body.size": 12,
|
||||
"typography.body.line_height": 17,
|
||||
"typography.body_strong.size": 13,
|
||||
"typography.body_strong.size": 12,
|
||||
"typography.body_strong.line_height": 17,
|
||||
"typography.label.size": 12.5,
|
||||
"typography.label.size": 11.5,
|
||||
"typography.label.line_height": 17,
|
||||
"typography.caption.size": 11,
|
||||
"typography.caption.size": 10.5,
|
||||
"typography.caption.line_height": 15
|
||||
}
|
||||
}"#;
|
||||
|
||||
@@ -31,13 +31,15 @@ fn pointer_events(events: &[Event]) -> usize {
|
||||
events.iter().filter(|event| matches!(event, Event::PointerMoved(_) | Event::PointerButton { .. })).count()
|
||||
}
|
||||
|
||||
/// One step of the app: the frame of `raw`, then empty frames at its time until all its pointer events arrived. A frame
|
||||
/// can take more than one pass, and egui gives the frame's events to its first; the framework gives a pass one press,
|
||||
/// as its last pointer event, and holds the events after it for the next frame ("Input pacing", one press per pass).
|
||||
/// One step of the app: the frame of `raw`, then empty frames at its time until all its pointer events arrived and the
|
||||
/// press lifecycle reported them. A frame can take more than one pass, and egui gives the frame's events to its first;
|
||||
/// the framework gives a pass one press, as its last pointer event, and holds the events after it for the next frame
|
||||
/// ("Input pacing", one press per pass). The lifecycle reports one phase a pass: a pass that brings a release and the
|
||||
/// next press reports the press's Down in the next pass, and the release that follows it one pass later still.
|
||||
fn run_ui(app: &mut VectorcraftApp, ctx: &egui::Context, mut raw: RawInput) -> egui::FullOutput {
|
||||
let (sent, time, screen_rect) = (pointer_events(&raw.events), raw.time, raw.screen_rect);
|
||||
let mut frames = Vec::new();
|
||||
let mut arrived = 0;
|
||||
let (mut arrived, mut owed) = (0, 0);
|
||||
loop {
|
||||
let mut first = None;
|
||||
let out = ctx.run_ui(raw, |ui| {
|
||||
@@ -49,8 +51,10 @@ fn run_ui(app: &mut VectorcraftApp, ctx: &egui::Context, mut raw: RawInput) -> e
|
||||
});
|
||||
let first = first.expect("a frame runs a pass");
|
||||
arrived += pointer_events(&first.events);
|
||||
let buttons = first.events.iter().filter(|event| matches!(event, Event::PointerButton { .. })).count();
|
||||
owed = (owed + buttons).saturating_sub(out.platform_output.num_completed_passes);
|
||||
frames.push(first);
|
||||
if arrived >= sent {
|
||||
if arrived >= sent && owed == 0 {
|
||||
FRAME_INPUT.with(|input| *input.borrow_mut() = Some((frames, ctx.cumulative_pass_nr())));
|
||||
return out;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ use std::process::Command;
|
||||
|
||||
use serde_json::Value;
|
||||
|
||||
const REV: &str = "4bed21baaa41d2b47bef90879c04df521f6f6043";
|
||||
const REV: &str = "6fcf61c816c399508a60c7029a59e2c7b6139e0b";
|
||||
const PACKAGES: &[(&str, &str, &str)] = &[
|
||||
("craft-pdf", "0.1.0", REV),
|
||||
("krilla", "0.8.2", REV),
|
||||
|
||||
Reference in new issue
Block a user