Merge branch 'main' into feat/param-schema-dispatch

Take the Properties mask id-salt change from the craft-libs pin. Keep
layer.vectorMask.edit from receiving a document key it does not take.
This commit is contained in:
FredApps committed 2026-11-23 05:56:42 +07:00
commit fcdbb38a31
35 files changed
+563 -452

No files matched your search

Generated
+109 -107
View File
@@ -1365,12 +1365,12 @@ dependencies = [
[[package]]
name = "craft"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"craft-automation",
"craft-behavior",
"craft-browse",
"craft-cms 0.1.0 (git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53)",
"craft-cms 0.1.0 (git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97)",
"craft-color-ui",
"craft-control",
"craft-dialogs",
@@ -1406,7 +1406,7 @@ dependencies = [
[[package]]
name = "craft-affinity"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"crc32fast",
"flate2",
@@ -1427,7 +1427,7 @@ dependencies = [
[[package]]
name = "craft-atomic"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"rustix 1.1.5",
]
@@ -1435,7 +1435,7 @@ dependencies = [
[[package]]
name = "craft-automation"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"base64 0.22.1",
"craft-behavior",
@@ -1460,7 +1460,7 @@ dependencies = [
[[package]]
name = "craft-behavior"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"accesskit",
"bitflags 2.13.2",
@@ -1478,7 +1478,7 @@ dependencies = [
[[package]]
name = "craft-browse"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"craft-behavior",
"craft-docpath",
@@ -1496,7 +1496,7 @@ dependencies = [
[[package]]
name = "craft-cloud-ui"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"egui",
]
@@ -1513,7 +1513,7 @@ dependencies = [
[[package]]
name = "craft-cms"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"md-5",
"rayon",
@@ -1522,7 +1522,7 @@ dependencies = [
[[package]]
name = "craft-codepage"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
[[package]]
name = "craft-color"
@@ -1545,10 +1545,10 @@ dependencies = [
[[package]]
name = "craft-color-ui"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"craft-behavior",
"craft-cms 0.1.0 (git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53)",
"craft-cms 0.1.0 (git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97)",
"craft-host",
"craft-i18n",
"craft-keymap",
@@ -1565,7 +1565,7 @@ dependencies = [
[[package]]
name = "craft-control"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"craft-ai-agents",
"craft-atomic",
@@ -1580,9 +1580,9 @@ dependencies = [
[[package]]
name = "craft-crs"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"craft-metadata 0.1.0 (git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53)",
"craft-metadata 0.1.0 (git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97)",
"craft-xml",
"thiserror 2.0.21",
]
@@ -1598,7 +1598,7 @@ dependencies = [
[[package]]
name = "craft-crw"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"thiserror 2.0.21",
]
@@ -1606,7 +1606,7 @@ dependencies = [
[[package]]
name = "craft-dds"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"rayon",
]
@@ -1641,7 +1641,7 @@ dependencies = [
[[package]]
name = "craft-dialogs"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"block2 0.6.2",
"craft-atomic",
@@ -1666,7 +1666,7 @@ dependencies = [
[[package]]
name = "craft-docpath"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"serde",
]
@@ -1674,7 +1674,7 @@ dependencies = [
[[package]]
name = "craft-draw"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"craft-behavior",
"craft-color-ui",
@@ -1693,12 +1693,12 @@ dependencies = [
[[package]]
name = "craft-eps"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
[[package]]
name = "craft-file-formats"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"craft-eps",
"craft-idml",
@@ -1706,7 +1706,7 @@ dependencies = [
"craft-kra",
"craft-ora",
"craft-pcraft-bundle",
"craft-raw 0.1.0 (git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53)",
"craft-raw 0.1.0 (git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97)",
"craft-svg",
"craft-zip",
"serde",
@@ -1716,7 +1716,7 @@ dependencies = [
[[package]]
name = "craft-flags"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"craft-atomic",
"dirs",
@@ -1726,7 +1726,7 @@ dependencies = [
[[package]]
name = "craft-font-catalog"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"fontique",
"harfrust 0.13.3",
@@ -1741,11 +1741,12 @@ dependencies = [
[[package]]
name = "craft-font-manager"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"craft-behavior",
"craft-font-catalog",
"craft-font-store",
"craft-fonts-build",
"craft-host",
"craft-i18n",
"craft-theme",
@@ -1760,7 +1761,7 @@ dependencies = [
[[package]]
name = "craft-font-store"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"cap-primitives",
"craft-atomic",
@@ -1781,7 +1782,7 @@ dependencies = [
[[package]]
name = "craft-fonts-build"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
[[package]]
name = "craft-geom"
@@ -1794,7 +1795,7 @@ dependencies = [
[[package]]
name = "craft-heif"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"heic-rs",
"rayon",
@@ -1803,7 +1804,7 @@ dependencies = [
[[package]]
name = "craft-host"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"bitflags 2.13.2",
"craft-i18n",
@@ -1816,7 +1817,7 @@ dependencies = [
[[package]]
name = "craft-i18n"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"chrono",
"fixed_decimal",
@@ -1844,7 +1845,7 @@ dependencies = [
[[package]]
name = "craft-idml"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"craft-xml",
"craft-zip",
@@ -1854,13 +1855,13 @@ dependencies = [
[[package]]
name = "craft-image-codecs"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"craft-dds",
"craft-heif",
"craft-jpeg",
"craft-metadata 0.1.0 (git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53)",
"craft-tiff 0.1.0 (git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53)",
"craft-metadata 0.1.0 (git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97)",
"craft-tiff 0.1.0 (git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97)",
"crc32fast",
"exr",
"flate2",
@@ -1882,7 +1883,7 @@ dependencies = [
[[package]]
name = "craft-imaging"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"craft-behavior",
"craft-color-ui",
@@ -1900,12 +1901,12 @@ dependencies = [
[[package]]
name = "craft-ipp"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
[[package]]
name = "craft-jpeg"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"thiserror 2.0.21",
]
@@ -1913,7 +1914,7 @@ dependencies = [
[[package]]
name = "craft-keymap"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"craft-host",
"craft-i18n",
@@ -1928,7 +1929,7 @@ dependencies = [
[[package]]
name = "craft-kra"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"craft-xml",
"craft-zip",
@@ -1938,7 +1939,7 @@ dependencies = [
[[package]]
name = "craft-layers"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"craft-behavior",
"craft-i18n",
@@ -1952,7 +1953,7 @@ dependencies = [
[[package]]
name = "craft-menu"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"craft-behavior",
"craft-host",
@@ -1982,11 +1983,11 @@ dependencies = [
[[package]]
name = "craft-metadata"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"brotli-decompressor 6.3.2",
"chrono",
"craft-tiff 0.1.0 (git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53)",
"craft-tiff 0.1.0 (git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97)",
"quick-xml 0.41.0",
"serde",
]
@@ -1994,7 +1995,7 @@ dependencies = [
[[package]]
name = "craft-ora"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"craft-xml",
"craft-zip",
@@ -2004,7 +2005,7 @@ dependencies = [
[[package]]
name = "craft-pages"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"craft-behavior",
"craft-keymap",
@@ -2019,7 +2020,7 @@ dependencies = [
[[package]]
name = "craft-pcraft-bundle"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"blake3",
"craft-atomic",
@@ -2032,7 +2033,7 @@ dependencies = [
[[package]]
name = "craft-pcraft-format"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"flate2",
"serde",
@@ -2043,7 +2044,7 @@ dependencies = [
[[package]]
name = "craft-pdf"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"bytemuck",
"flate2",
@@ -2058,7 +2059,7 @@ dependencies = [
[[package]]
name = "craft-pdn"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"flate2",
"thiserror 2.0.21",
@@ -2067,7 +2068,7 @@ dependencies = [
[[package]]
name = "craft-platform"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"async-channel",
"async-io",
@@ -2097,7 +2098,7 @@ dependencies = [
[[package]]
name = "craft-plist"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"thiserror 2.0.21",
]
@@ -2105,7 +2106,7 @@ dependencies = [
[[package]]
name = "craft-print"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"craft-behavior",
"craft-host",
@@ -2128,7 +2129,7 @@ dependencies = [
[[package]]
name = "craft-psd"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"encoding_rs",
"flate2",
@@ -2139,7 +2140,7 @@ dependencies = [
[[package]]
name = "craft-quit"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"dispatch2",
"egui",
@@ -2168,12 +2169,12 @@ dependencies = [
[[package]]
name = "craft-raw"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"chrono",
"craft-crw 0.1.0 (git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53)",
"craft-metadata 0.1.0 (git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53)",
"craft-tiff 0.1.0 (git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53)",
"craft-crw 0.1.0 (git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97)",
"craft-metadata 0.1.0 (git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97)",
"craft-tiff 0.1.0 (git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97)",
"jxl-oxide",
"miniz_oxide 0.9.1",
"rayon",
@@ -2186,7 +2187,7 @@ dependencies = [
[[package]]
name = "craft-review"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"craft-behavior",
"craft-host",
@@ -2204,7 +2205,7 @@ dependencies = [
[[package]]
name = "craft-settings"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"craft-atomic",
"craft-host",
@@ -2221,7 +2222,7 @@ dependencies = [
[[package]]
name = "craft-svg"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"craft-image-codecs",
"craft-xml",
@@ -2242,7 +2243,7 @@ dependencies = [
[[package]]
name = "craft-table"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"craft-behavior",
"craft-keymap",
@@ -2254,7 +2255,7 @@ dependencies = [
[[package]]
name = "craft-text"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"craft-behavior",
"craft-font-manager",
@@ -2277,7 +2278,7 @@ dependencies = [
[[package]]
name = "craft-theme"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"bitflags 2.13.2",
"craft-tracked",
@@ -2292,7 +2293,7 @@ dependencies = [
[[package]]
name = "craft-theme-editor"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"craft-behavior",
"craft-theme",
@@ -2303,7 +2304,7 @@ dependencies = [
[[package]]
name = "craft-theme-store"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"craft-atomic",
"craft-behavior",
@@ -2327,7 +2328,7 @@ dependencies = [
[[package]]
name = "craft-tiff"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"serde",
"thiserror 2.0.21",
@@ -2336,7 +2337,7 @@ dependencies = [
[[package]]
name = "craft-time"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"serde",
"thiserror 2.0.21",
@@ -2345,7 +2346,7 @@ dependencies = [
[[package]]
name = "craft-timeline"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"craft-behavior",
"craft-keymap",
@@ -2360,7 +2361,7 @@ dependencies = [
[[package]]
name = "craft-tracked"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"serde",
]
@@ -2368,7 +2369,7 @@ dependencies = [
[[package]]
name = "craft-ui"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"craft-cloud-ui",
"craft-ui-canvas",
@@ -2382,7 +2383,7 @@ dependencies = [
[[package]]
name = "craft-ui-canvas"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"craft-behavior",
"craft-i18n",
@@ -2398,7 +2399,7 @@ dependencies = [
[[package]]
name = "craft-ui-contract"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"accesskit",
"craft-behavior",
@@ -2438,7 +2439,7 @@ dependencies = [
[[package]]
name = "craft-ui-macros"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"proc-macro-crate",
"proc-macro2",
@@ -2449,7 +2450,7 @@ dependencies = [
[[package]]
name = "craft-ui-panels"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"craft-behavior",
"craft-host",
@@ -2467,7 +2468,7 @@ dependencies = [
[[package]]
name = "craft-ui-patterns"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"craft-behavior",
"craft-host",
@@ -2488,7 +2489,7 @@ dependencies = [
[[package]]
name = "craft-ui-shell"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"craft-behavior",
"craft-host",
@@ -2500,6 +2501,7 @@ dependencies = [
"craft-ui-panels",
"craft-window",
"egui",
"raw-window-handle",
"serde",
"web-time",
]
@@ -2507,7 +2509,7 @@ dependencies = [
[[package]]
name = "craft-ui-widgets"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"craft-behavior",
"craft-host",
@@ -2524,7 +2526,7 @@ dependencies = [
[[package]]
name = "craft-update"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"chrono",
"craft-host",
@@ -2553,7 +2555,7 @@ dependencies = [
[[package]]
name = "craft-win32"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"winsafe",
]
@@ -2561,7 +2563,7 @@ dependencies = [
[[package]]
name = "craft-window"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"craft-atomic",
"craft-behavior",
@@ -2591,7 +2593,7 @@ dependencies = [
[[package]]
name = "craft-xcf"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"flate2",
"thiserror 2.0.21",
@@ -2600,7 +2602,7 @@ dependencies = [
[[package]]
name = "craft-xml"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"quick-xml 0.41.0",
"serde",
@@ -2610,7 +2612,7 @@ dependencies = [
[[package]]
name = "craft-zip"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"flate2",
"thiserror 2.0.21",
@@ -4073,7 +4075,7 @@ dependencies = [
[[package]]
name = "hayro"
version = "0.7.1"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"bytemuck",
"hayro-interpret",
@@ -4103,7 +4105,7 @@ dependencies = [
[[package]]
name = "hayro-interpret"
version = "0.7.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"bitflags 2.13.2",
"hayro-cmap",
@@ -4121,7 +4123,7 @@ dependencies = [
[[package]]
name = "hayro-jbig2"
version = "0.3.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"fearless_simd",
"hayro-ccitt",
@@ -4145,7 +4147,7 @@ checksum = "bc2d80da85f31c3fdc0366431f44cfd645a9da1e242ed1f4a61f213d9765660f"
[[package]]
name = "hayro-syntax"
version = "0.7.2"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"flate2",
"hayro-ccitt",
@@ -5229,7 +5231,7 @@ checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4"
[[package]]
name = "linesweeper"
version = "0.5.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"arrayvec",
"kurbo 0.13.1",
@@ -6445,7 +6447,7 @@ dependencies = [
"clap",
"core-graphics2",
"craft",
"craft-cms 0.1.0 (git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53)",
"craft-cms 0.1.0 (git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97)",
"craft-image-codecs",
"craft-svg",
"craft-update",
@@ -6495,7 +6497,7 @@ dependencies = [
"craft",
"craft-develop",
"craft-develop-model",
"craft-metadata 0.1.0 (git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53)",
"craft-metadata 0.1.0 (git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97)",
"criterion",
"photocraft-color",
"photocraft-geom",
@@ -6547,7 +6549,7 @@ dependencies = [
"clap_complete",
"clap_mangen",
"craft",
"craft-cms 0.1.0 (git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53)",
"craft-cms 0.1.0 (git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97)",
"craft-image-codecs",
"craft-psd",
"photocraft-automation",
@@ -6570,7 +6572,7 @@ dependencies = [
name = "photocraft-color"
version = "0.23.1"
dependencies = [
"craft-cms 0.1.0 (git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53)",
"craft-cms 0.1.0 (git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97)",
"craft-tracked",
"craft-ui-macros",
"serde",
@@ -6580,7 +6582,7 @@ dependencies = [
name = "photocraft-compose"
version = "0.23.1"
dependencies = [
"craft-cms 0.1.0 (git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53)",
"craft-cms 0.1.0 (git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97)",
"criterion",
"photocraft-color",
"photocraft-doc",
@@ -6611,7 +6613,7 @@ version = "0.23.1"
dependencies = [
"blake3",
"craft-affinity",
"craft-cms 0.1.0 (git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53)",
"craft-cms 0.1.0 (git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97)",
"craft-develop-model",
"craft-image-codecs",
"craft-psd",
@@ -6643,7 +6645,7 @@ dependencies = [
"chrono",
"craft",
"craft-affinity",
"craft-cms 0.1.0 (git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53)",
"craft-cms 0.1.0 (git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97)",
"craft-develop-model",
"craft-file-formats",
"craft-image-codecs",
@@ -6724,7 +6726,7 @@ name = "photocraft-gpu"
version = "0.23.1"
dependencies = [
"bytemuck",
"craft-cms 0.1.0 (git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53)",
"craft-cms 0.1.0 (git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97)",
"half",
"log",
"photocraft-algo",
@@ -6747,7 +6749,7 @@ dependencies = [
"blake3",
"craft",
"craft-affinity",
"craft-cms 0.1.0 (git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53)",
"craft-cms 0.1.0 (git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97)",
"craft-crs",
"craft-docpath",
"craft-file-formats",
@@ -6758,7 +6760,7 @@ dependencies = [
"craft-pdn",
"craft-psd",
"craft-svg",
"craft-tiff 0.1.0 (git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53)",
"craft-tiff 0.1.0 (git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97)",
"craft-xcf",
"craft-xml",
"crc32fast",
@@ -6816,7 +6818,7 @@ name = "photocraft-paint"
version = "0.23.1"
dependencies = [
"base64 0.23.1",
"craft-cms 0.1.0 (git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53)",
"craft-cms 0.1.0 (git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97)",
"craft-tracked",
"craft-ui-macros",
"photocraft-color",
@@ -6868,7 +6870,7 @@ version = "0.23.1"
dependencies = [
"craft-develop",
"craft-image-codecs",
"craft-raw 0.1.0 (git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53)",
"craft-raw 0.1.0 (git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97)",
"flate2",
"image",
"photocraft-raw",
@@ -9663,7 +9665,7 @@ dependencies = [
[[package]]
name = "vello_common"
version = "0.0.8"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"bytemuck",
"fearless_simd",
@@ -9711,7 +9713,7 @@ dependencies = [
[[package]]
name = "vello_cpu"
version = "0.0.8"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
dependencies = [
"bytemuck",
"glifo 0.1.1",
@@ -11347,14 +11349,14 @@ source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d9
[[patch.unused]]
name = "hayro-cmap"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
[[patch.unused]]
name = "hayro-postscript"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
[[patch.unused]]
name = "krilla"
version = "0.8.2"
source = "git+https://github.com/storytold/craft-libs?rev=e953d47a378776dea207899b10baf969fc8cbe53#e953d47a378776dea207899b10baf969fc8cbe53"
source = "git+https://github.com/storytold/craft-libs?rev=8d436f486a2e890930ffdf10b602935feb492c97#8d436f486a2e890930ffdf10b602935feb492c97"
+39 -39
View File
@@ -12,21 +12,21 @@ rust-version = "1.95"
[workspace.dependencies]
# The craft framework through its facade (`craft::ui::…`). The egui `[patch]` below must match
# `craft::egui_fork::REV` (checked by `cargo xtask ci`).
craft = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53", default-features = false }
craft-tracked = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
craft-ui-macros = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
craft = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97", default-features = false }
craft-tracked = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
craft-ui-macros = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
# internal
photocraft-geom = { path = "crates/geom" }
photocraft-color = { path = "crates/color" }
photocraft-raster = { path = "crates/raster" }
photocraft-doc = { path = "crates/doc" }
photocraft-ops = { path = "crates/ops" }
craft-plist = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
photocraft-codecs = { package = "craft-image-codecs", git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
photocraft-formats = { package = "craft-file-formats", git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53", features = ["raster-codecs", "pdf", "svg", "ora", "kra", "xcf", "pdn", "raw", "psd", "affinity", "pcraft"] }
craft-plist = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
photocraft-codecs = { package = "craft-image-codecs", git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
photocraft-formats = { package = "craft-file-formats", git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97", features = ["raster-codecs", "pdf", "svg", "ora", "kra", "xcf", "pdn", "raw", "psd", "affinity", "pcraft"] }
photocraft-raw = { path = "crates/raw" }
craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
photocraft-compose = { path = "crates/compose" }
photocraft-gpu = { path = "crates/gpu" }
photocraft-paint = { path = "crates/paint" }
@@ -46,36 +46,36 @@ photocraft-ipp = { path = "crates/ipp" }
# external
# ICC colour management: the shared crate (replaces crates/cms; craft-libs#779).
craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
craft-print = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
craft-print = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
# HEIC/HEIF: the shared decoder (replaces crates/heif; craft-libs#784).
craft-heif = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53", features = ["raster", "write-raster"] }
craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
craft-jpeg = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
craft-pcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
craft-pcraft-bundle = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
craft-zip = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
craft-ora = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
craft-kra = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
craft-xcf = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
craft-pdn = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
craft-heif = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97", features = ["raster", "write-raster"] }
craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
craft-jpeg = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
craft-pcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
craft-pcraft-bundle = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
craft-zip = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
craft-ora = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
craft-kra = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
craft-xcf = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
craft-pdn = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
# Keep the shared embedded-image validation API until the framework revision includes it.
craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53", features = ["tree-render", "tree-render-system-fonts"] }
craft-raw = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97", features = ["tree-render", "tree-render-system-fonts"] }
craft-raw = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
# Camera-field EXIF reader/writer, shared prerequisite craft-libs#1563.
craft-metadata = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
craft-crs = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
craft-metadata = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
craft-crs = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
craft-develop = { git = "https://github.com/storytold/craft-libs", rev = "22a80f2965469c633518f4779d7b414ac15dd5f3" }
craft-develop-model = { git = "https://github.com/storytold/craft-libs", rev = "22a80f2965469c633518f4779d7b414ac15dd5f3" }
# Interface translations: lookup, fallback, CLDR plurals and language names over the craft-i18n
# catalogs that `crates/ui-egui/build.rs` embeds from `CRAFT_I18N_DIR` (storytold/craft-i18n, at
# the commit in `craft-i18n.rev`). Already in the tree through craft.
craft-i18n = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
craft-i18n = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
# craft-update: app-specific pretend versions apply to startup and manual checks.
craft-update = { git = "https://github.com/storytold/craft-libs", version = "=0.1.0", rev = "e953d47a378776dea207899b10baf969fc8cbe53", features = ["ui"] }
craft-update = { git = "https://github.com/storytold/craft-libs", version = "=0.1.0", rev = "8d436f486a2e890930ffdf10b602935feb492c97", features = ["ui"] }
thiserror = "2"
serde = { version = "1", features = ["derive", "rc"] }
serde_json = "1"
@@ -342,16 +342,16 @@ opt-level = 3
# Keep the complete egui family and native event bridge on reviewed fork commits.
[patch.crates-io]
krilla = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
hayro = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
vello_common = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
vello_cpu = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
krilla = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
hayro = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
vello_common = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
vello_cpu = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
ecolor = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" }
emath = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" }
epaint = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" }
+1 -1
View File
@@ -155,7 +155,7 @@ fn control_port_for(cli: Option<u16>, prefs: &photocraft_engine::prefs::Integrat
}
/// The main window: 1440 × 900 (shrunk to fit the monitor, and maximized on the first frame
/// when it still doesn't fit, `work_area::fit_window`), centred on the main monitor. Without
/// when it still doesn't fit, `embed::before_ui`), centred on the main monitor. Without
/// `centered`, Windows cascades each new window from the top-left corner, so it opened at a
/// different offset every launch (#419). A later launch restores the saved position instead
/// (`main` turns `centered` off, #4826). Wayland compositors place windows themselves.
+1 -1
View File
@@ -19,7 +19,7 @@ photocraft-geom = { workspace = true }
photocraft-color = { workspace = true }
craft-cms = { workspace = true }
# PCTIP codec from craft-libs#1564; isolated pin until the shared revision is adopted workspace-wide.
craft-pcraft-tip = { package = "craft-pcraft-format", git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
craft-pcraft-tip = { package = "craft-pcraft-format", git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
photocraft-raster = { workspace = true }
photocraft-doc = { workspace = true }
photocraft-ops = { workspace = true }
+10 -8
View File
@@ -333,6 +333,8 @@ impl Default for General {
}
}
/// Preferences › Interface. The fields are in the page's order (its groups show in the order of their first row):
/// Appearance (mode, themes, canvas), Presentation (language, font size, scale), then the options.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Interface {
@@ -349,20 +351,20 @@ pub struct Interface {
/// Pasteboard colour in standard screen mode (`canvasCustomColor` when "custom").
pub canvas_color: CanvasColor,
pub canvas_custom_color: String,
/// Document border in standard screen mode.
pub canvas_border: CanvasBorder,
/// UI language: `auto` (follow the system) or a language code such as `en`, `ja`. The list of
/// languages belongs to the shell (`ui-egui` i18n); an unknown code falls back to `auto`.
/// Command ids and the control protocol stay English.
pub language: String,
pub ui_font_size: UiFontSize,
pub ui_scale: UiScale,
/// Show the repeating dot pattern on the canvas surround (including the empty workspace).
/// Disable for a uniform background, for example on OLED displays (#2264).
pub show_canvas_dots: bool,
/// List recent files on the Home screen (the empty workspace). Off hides the list; the
/// recent files themselves are kept and File > Open Recent still shows them.
pub show_home_recent_files: bool,
/// Document border in standard screen mode.
pub canvas_border: CanvasBorder,
pub ui_scale: UiScale,
/// UI language: `auto` (follow the system) or a language code such as `en`, `ja`. The list of
/// languages belongs to the shell (`ui-egui` i18n); an unknown code falls back to `auto`.
/// Command ids and the control protocol stay English.
pub language: String,
pub ui_font_size: UiFontSize,
pub show_channels_in_color: bool,
pub dynamic_color_sliders: bool,
/// Draw menu item colours set with Edit › Menus.
+1 -1
View File
@@ -7,7 +7,7 @@ license.workspace = true
rust-version.workspace = true
[dependencies]
craft-ipp = { git = "https://github.com/storytold/craft-libs", rev = "e953d47a378776dea207899b10baf969fc8cbe53" }
craft-ipp = { git = "https://github.com/storytold/craft-libs", rev = "8d436f486a2e890930ffdf10b602935feb492c97" }
[lints]
workspace = true
+5 -1
View File
@@ -3,7 +3,7 @@ use super::{
DocId, Document, HashMap, PhotocraftApp, Session, UiState, Value, actions, canvas, delete_layer_prompt, discard_ui, file_open, gpu_canvas, gpu_status,
histogram_panel, i18n, jobs_ui, json, kys_import, last_brush, layers_panel_ui, mask_thumbs_ui, mask_trash_prompt, monitor_status, native_menu, notices,
open_prompt, paint_mouse, panel_docking, panels, prefs_ui, preset_files_ui, screen_picker, shortcuts, smart_svg_ui, state, stroke_trace, stylus, theme,
tool_memory, transform_tool, type_tool, type_transform, updates_ui, vector_ui, view_cmds, work_area,
tool_memory, transform_tool, type_tool, type_transform, updates_ui, vector_ui, view_cmds,
};
mod clipboard;
@@ -299,6 +299,10 @@ impl eframe::App for PhotocraftApp {
}
fn ui(&mut self, ui: &mut egui::Ui, frame: &mut eframe::Frame) {
// Hands the runtime the native window (on Windows it answers the window's hit test) and
// maximizes a window bigger than its display (1440 × 900 on 1366 × 768) once (#315).
#[cfg(not(target_arch = "wasm32"))]
craft::ui::shell::embed::before_ui(ui.ctx(), frame);
#[cfg(test)]
if let Some(mut body) = self.framework.test_body.take() {
body(ui, self);
+1 -4
View File
@@ -1,6 +1,6 @@
use super::{
PhotocraftApp, canvas, discard_ui, gpu_canvas, gpu_status, i18n, jobs_ui, last_brush, monitor_status, native_menu, notices, paint_mouse, panels, prefs_ui,
screen_picker, shortcuts, smart_svg_ui, tool_memory, transform_tool, type_tool, updates_ui, view_cmds, work_area,
screen_picker, shortcuts, smart_svg_ui, tool_memory, transform_tool, type_tool, updates_ui, view_cmds,
};
use craft::ui::contract::Bind;
use craft::ui::runtime::env::WindowKey;
@@ -93,9 +93,6 @@ impl PhotocraftApp {
monitor_status::poll_frame(self, ctx, frame);
// Control requests and persisted preferences can change the language in this frame.
i18n::sync_context(ctx, &self.session.prefs().interface.language);
// A window bigger than its display (1440 × 900 on 1366 × 768) runs under the taskbar:
// maximize it into the work area once (#315).
work_area::fit_window(ctx);
// The runtime's close path, which asks PhotoCraft when the window was asked to close.
craft::ui::shell::embed::logic(ctx, || discard_ui::close_decision(self));
// A component refused its input (a zoom field turning a Tab or Alt away, a dialog field):
+3 -4
View File
@@ -2,10 +2,9 @@
//! (craft-libs docs/craft-framework.md 2.2, "Host the runtime from your own eframe `App`"):
//! installed once with PhotoCraft's fonts, then given PhotoCraft's preferences before each frame.
//!
//! eframe's `ui` would also call `embed::before_ui`, which needs craft-ui-shell's `app` feature;
//! that feature turns on egui's `default_fonts`, which PhotoCraft leaves out (it ships them
//! deflated). Its two jobs are PhotoCraft's own here: `work_area::fit_window` fits the window to
//! its monitor, and the Windows window comes from PhotoCraft's title bar code.
//! eframe's `ui` calls `embed::before_ui` first, which hands the runtime the native window (on
//! Windows the runtime answers its hit test: resize edges, the title bar's move area, snap
//! layouts) and fits the window to its monitor once.
//!
//! The `craft` facade features PhotoCraft enables for this: `text`, `text-font-picker`,
//! `font-manager`, `menu`, `timeline` and `print`, plus `dialogs` on native targets.
@@ -21,13 +21,16 @@ use craft::keymap::Mods;
use craft::theme::Srgba;
use craft::ui::buttons::ToggleButton;
use craft::ui::choice::Swatch;
use craft::ui::contract::{Bind, Entry, Outcome as _, Props as _, Show as _};
use craft::ui::contract::{Bind, Entry, Outcome as _, Props as _, Show as _, ShowContainer as _};
use craft::ui::dialog::{DialogId, StackDialog as _};
use craft::ui::display::Text;
use craft::ui::layout_components::Row;
use craft::ui::patterns::form_dialogs::{DialogFields, FieldValue, HostedParamDialog, Param, ParamKind};
use craft::ui::pickers::Select;
use craft::ui::primitives::IconSpec;
use craft::ui::runtime::env::Label;
use craft::ui::runtime::requests::EyedropperRequest;
use craft::ui::style::TypeRole;
use photocraft_color::ColorMode;
use photocraft_doc::Document;
use photocraft_engine::installed_profiles::InstalledProfile;
@@ -436,20 +439,20 @@ fn droppers_row() -> Param {
("add", Label::from(tl!("Add to Sample")), IconSpec::mark(CursorBadge::Add)),
("subtract", Label::from(tl!("Subtract from Sample")), IconSpec::mark(CursorBadge::Subtract)),
];
let response = ui
.horizontal(|ui| {
for (id, label, icon) in tools {
let toggle = ToggleButton::new(label, Bind::given(armed == id)).icon(icon).icon_only().id_salt(id).show(ui);
let response = Row::new()
.show(ui, |ui, _| {
for (id, label, icon) in &tools {
let toggle = ToggleButton::new(label.clone(), Bind::given(armed == *id)).icon(icon.clone()).icon_only().id_salt(*id).show(ui);
match toggle.value().copied() {
Some(true) => {
fields.set(SAMPLE_TOOL, id);
fields.set(SAMPLE_TOOL, *id);
}
Some(false) => fields.set(SAMPLE_TOOL, ""),
None => {}
}
}
})
.response;
.output;
cx.sampling(!fields.text(SAMPLE_TOOL).unwrap_or_default().is_empty());
response
})
@@ -483,18 +486,16 @@ fn result_row() -> Param {
apply_picked_result(fields);
let rgb = result_color(fields);
let color = Srgba::from_rgb_array(rgb);
let out = ui
.horizontal(|ui| {
let swatch = Swatch::new(Label::from(tl!("Result")), Mixed::Same(color)).picker(RESULT_PICKED).id_salt("result").show(ui);
ui.monospace(color.to_hex());
swatch
})
.inner;
let row = Row::new().show(ui, |ui, _| {
let swatch = Swatch::new(Label::from(tl!("Result")), Mixed::Same(color)).picker(RESULT_PICKED).id_salt("result").show(ui);
Text::new(color.to_hex()).role(TypeRole::Mono).show(ui);
swatch.pick_color.is_some()
});
// The row writes nothing itself: the picker opens on the shown Result and answers into `resultPicked`.
if out.pick_color.is_some() {
if row.inner == Some(true) {
cx.pick_color(RESULT_PICKED, color);
}
out.response().clone()
row.output
})
}
-1
View File
@@ -63,7 +63,6 @@ pub mod theme;
pub mod tone;
pub(crate) mod tool_memory;
pub mod updates_ui;
pub mod work_area;
use std::collections::HashMap;
+1 -2
View File
@@ -2,8 +2,7 @@
use craft::ui::patterns::blend_keys::{BlendKeyEntry, BlendShortcut};
#[cfg(test)]
use egui::Rect;
use egui::vec2;
use egui::{Rect, vec2};
use photocraft_color::BlendMode;
use photocraft_doc::LayerId;
use photocraft_engine::history_source_cmds::HistorySource;
+18 -16
View File
@@ -2,9 +2,9 @@
//! section's controls (`brush_sections`) and the stroke strip.
use craft::draw::ui::brush_settings::{BrushSection, BrushSettingsPanel, BrushStrokeStrip, StripImage};
use craft::ui::contract::Bind;
use craft::ui::contract::{Bind, ShowContainer as _};
use craft::ui::layout_components::Stack;
use craft::ui::primitives::Revision;
use egui::vec2;
use photocraft_engine::BrushSettings;
use super::brush_panel::{CHECKBOX_ONLY_START, SECTIONS, section_flag, section_lock};
@@ -50,34 +50,36 @@ pub(super) fn brush_settings(app: &mut PhotocraftApp, ui: &mut egui::Ui) {
let rows = sections(&mut brush);
let can_update =
app.session.tools.current_preset.as_deref().is_some_and(|name| app.session.tools.presets.iter().any(|p| p.name.eq_ignore_ascii_case(name)));
let strip = BrushStrokeStrip::new(
tl!("Stroke preview"),
Revision::of(&(brush_preview::preview_sig(&before), text)),
StripImage::new(|size| brush_preview::stroke_image(&before, size, text)),
);
let tool = app.ui.tool;
// The section is bound through a copy so the pane closure can borrow the whole app.
let mut section = app.ui.brush_section;
let panel = BrushSettingsPanel::new(tl!("Brush Settings"), &rows, Bind::bound(&mut section)).link_row().strip(strip);
let panel = if can_update { panel.can_update() } else { panel };
// A frame can run the pane twice and egui gives a frame's input events to the first pass only: the reports of
// every pass add up. The framework panel greys out the pane of a section that is off.
let mut reported = SectionOut::default();
let out = ui.allocate_ui(vec2(ui.available_width(), HEIGHT), |ui| {
// The stack's body can run twice in a pass, so each run builds its own panel.
let out = Stack::new().fill_width().room_height(HEIGHT).show(ui, |ui, _| {
let strip = BrushStrokeStrip::new(
tl!("Stroke preview"),
Revision::of(&(brush_preview::preview_sig(&before), text)),
StripImage::new(|size| brush_preview::stroke_image(&before, size, text)),
);
let panel = BrushSettingsPanel::new(tl!("Brush Settings"), &rows, Bind::bound(&mut section)).link_row().strip(strip);
let panel = if can_update { panel.can_update() } else { panel };
panel.show(ui, |ui, _, section| {
reported.merge(brush_sections::section_body(app, ui, &mut brush, *section, tool));
})
});
let out = out.inner;
app.ui.brush_section = section;
if let Some(name) = reported.picked.take() {
super::brush_panel::run_or_status(app, "brush.presets.setCurrent", serde_json::json!({ "name": name }));
}
if apply_section_events(&mut brush, &mut app.ui.brush_section, out.sections) {
let _ = crate::menus::invoke(app, &ctx, "window.panel.brushes", serde_json::json!({}));
}
if let Some(action) = out.action {
apply_action(app, &mut brush, action);
if let Some(out) = out.inner {
if apply_section_events(&mut brush, &mut app.ui.brush_section, out.sections) {
let _ = crate::menus::invoke(app, &ctx, "window.panel.brushes", serde_json::json!({}));
}
if let Some(action) = out.action {
apply_action(app, &mut brush, action);
}
}
super::brush_panel::commit_keyed(app, &before, &brush, reported.key);
}
+4 -7
View File
@@ -194,13 +194,10 @@ fn swap_and_default_colors_recolour_selected_type() {
app.run("tools.setColors", json!({"foreground": "#ff0000", "background": "#0000ff"})).unwrap();
let anchor = if selected { 6 } else { 11 };
app.ui.text_edit = Some(crate::state::TextEdit { layer: id.0, document: None, caret: 11, anchor, session: "s".into(), created: false, mask: false });
let mut h = egui_kittest::Harness::builder().with_context(app.ctx().clone()).with_size(vec2(80.0, 120.0)).build_ui_state(
|ui, app: &mut Box<PhotocraftApp>| {
let w = ui.available_width();
color_chips(app, ui, w)
},
app,
);
let mut h = egui_kittest::Harness::builder()
.with_context(app.ctx().clone())
.with_size(vec2(80.0, 120.0))
.build_ui_state(|ui, app: &mut Box<PhotocraftApp>| color_chips(app, ui), app);
PhotocraftApp::setup_context(&h.ctx, crate::theme::AppTheme::studio());
h.run_steps(2);
h.get_by_label("Switch Foreground and Background Colors (X)").click();
+4 -3
View File
@@ -8,6 +8,7 @@ use craft::ui::buttons::{Button, ToggleButton};
use craft::ui::contract::{Bind, Entry, Props as _, Show, ShowContainer};
use craft::ui::display::Text;
use craft::ui::form::Field;
use craft::ui::layout_components::Row;
use craft::ui::pickers::Select;
use craft::ui::runtime::env::{LengthUnits, UnitKind};
use craft::ui::sections::Section;
@@ -117,7 +118,7 @@ fn canvas_section(ui: &mut egui::Ui, run: &mut Vec<(String, Value)>, f: &Facts,
}
let portrait = f.height > f.width;
let square = f.width == f.height;
ui.horizontal(|ui| {
Row::new().show(ui, |ui, _| {
let to_portrait = ToggleButton::new(tl!("Portrait"), Bind::given(portrait)).show(ui);
if to_portrait.events.committed() == Some(&true) && !portrait && !square {
run.push(canvas_size(extent[1], extent[0]));
@@ -168,7 +169,7 @@ pub fn properties(app: &mut PhotocraftApp, ui: &mut egui::Ui) {
let mut run: Vec<(String, Value)> = Vec::new();
Section::new(tl!("Canvas")).show(ui, |ui, _| canvas_section(ui, &mut run, &facts, kind));
Section::new(tl!("Rulers & Grids")).show(ui, |ui, _| {
ui.horizontal(|ui| {
Row::new().show(ui, |ui, _| {
for id in ["view.rulers", "view.show.grid", "view.show.pixelGrid"] {
ToggleButton::command(CommandRef::new(id)).show(ui);
}
@@ -180,7 +181,7 @@ pub fn properties(app: &mut PhotocraftApp, ui: &mut egui::Ui) {
}
});
Section::new(tl!("Guides")).show(ui, |ui, _| {
ui.horizontal(|ui| {
Row::new().show(ui, |ui, _| {
for id in ["view.show.guides", "view.lockGuides"] {
ToggleButton::command(CommandRef::new(id)).show(ui);
}
+33 -29
View File
@@ -5,7 +5,7 @@ use craft::ui::bars::{Bar, BarKind};
use craft::ui::buttons::Button;
use craft::ui::contract::{Bind, Show, ShowContainer};
use craft::ui::form::SliderField;
use craft::ui::runtime::env::UnitKind;
use craft::ui::runtime::env::{UnitKind, with_env};
use craft::ui::sections::Section;
use craft::ui::value_drag::SliderScale;
use photocraft_doc::{Layer, LayerContent};
@@ -68,36 +68,40 @@ fn mask_section(app: &mut PhotocraftApp, ui: &mut egui::Ui, layer: &Layer, secti
let Some(document) = app.session.active().map(|s| s.doc.id.0) else { return };
let layer_id = layer.id.0;
let mut edits: Vec<Value> = Vec::new();
ui.push_id((document, layer.id, section.key), |ui| {
Section::new(section.title).show(ui, |ui, _| {
// Feather's track is curved like Photoshop's, so a few px can be dragged to (#6545).
let rows = [
("density", tl!("Density"), f64::from(density) * 100.0, 100.0, 100.0, UnitKind::Percent, SliderScale::Linear),
("feather", tl!("Feather"), f64::from(feather), 1000.0, 0.0, UnitKind::Pixels, SliderScale::Power(3.0)),
];
for (field, label, value, max, reset, unit, scale) in rows {
let out = SliderField::new(label, Bind::given(value).reset(reset), 0.0..=max).scale(scale).unit_kind(unit).show(ui);
for event in &out.events {
// A cancel lands on the value from before the drag, written into the same undo step.
let Some(value) = event.landed() else { continue };
// The pixel mask's command refuses a stale dialog by its document; the
// vector mask's takes no `document`.
let mut params = json!({"layer": layer_id});
if section.command != "layer.vectorMask.edit" {
params["document"] = json!(document);
with_env(
ui,
|set| set.id_salt = Some(egui::Id::unique((document, layer.id, section.key))),
|ui| {
Section::new(section.title).show(ui, |ui, _| {
// Feather's track is curved like Photoshop's, so a few px can be dragged to (#6545).
let rows = [
("density", tl!("Density"), f64::from(density) * 100.0, 100.0, 100.0, UnitKind::Percent, SliderScale::Linear),
("feather", tl!("Feather"), f64::from(feather), 1000.0, 0.0, UnitKind::Pixels, SliderScale::Power(3.0)),
];
for (field, label, value, max, reset, unit, scale) in rows {
let out = SliderField::new(label, Bind::given(value).reset(reset), 0.0..=max).scale(scale).unit_kind(unit).show(ui);
for event in &out.events {
// A cancel lands on the value from before the drag, written into the same undo step.
let Some(value) = event.landed() else { continue };
// The pixel mask's command refuses a stale dialog by its document; the
// vector mask's takes no `document`.
let mut params = json!({"layer": layer_id});
if section.command != "layer.vectorMask.edit" {
params["document"] = json!(document);
}
if let Some(gesture) = event.id() {
params["coalesce"] = json!(format!("{}:{document}:{layer_id}:{field}:{}", section.key, gesture.0));
}
params[field] = json!(value);
edits.push(params);
}
if let Some(gesture) = event.id() {
params["coalesce"] = json!(format!("{}:{document}:{layer_id}:{field}:{}", section.key, gesture.0));
}
params[field] = json!(value);
edits.push(params);
}
}
if section.refine {
refine_row(ui);
}
});
});
if section.refine {
refine_row(ui);
}
});
},
);
for params in edits {
if let Err(error) = app.run(section.command, params) {
app.ui.status = error;
@@ -7,6 +7,7 @@ use craft::ui::choice::Checkbox;
use craft::ui::contract::{Bind, Entry, Outcome as _, Props as _, Show as _, ShowContainer as _};
use craft::ui::display::Text;
use craft::ui::form::{Field, FieldGroup, SliderField};
use craft::ui::layout_components::Row;
use craft::ui::pickers::Select;
use craft::ui::runtime::env::UnitKind;
use craft::ui::text::{LinkedFields, NumberField};
@@ -59,7 +60,7 @@ pub fn panel(app: &mut PhotocraftApp, ui: &mut egui::Ui) {
let cs = app.session.presets.clone.clone();
let slot = cs.active().clone();
let mut select = None;
ui.horizontal(|ui| {
Row::new().show(ui, |ui, _| {
for i in 0..photocraft_engine::presets::clone_source::SLOTS {
let mut on = cs.active == i;
let out = ToggleButton::new(format!("{}", i + 1), Bind::bound(&mut on)).show(ui);
+40 -8
View File
@@ -7,11 +7,14 @@ use serde_json::json;
use crate::PhotocraftApp;
/// The whole app in a 1100 × 600 window whose frame the app draws (the Windows decision), with `setup` run on the
/// app before the first frame.
fn integrated_app(setup: impl FnOnce(&mut PhotocraftApp) + 'static) -> Harness<'static, Box<PhotocraftApp>> {
/// The window size most trials use, in points.
const WINDOW: egui::Vec2 = vec2(1100.0, 600.0);
/// The whole app in a window of `size` points at `pixels_per_point` whose frame the app draws (the Windows decision),
/// with `setup` run on the app before the first frame.
fn integrated_app(size: egui::Vec2, pixels_per_point: f32, setup: impl FnOnce(&mut PhotocraftApp) + 'static) -> Harness<'static, Box<PhotocraftApp>> {
let mut setup = Some(setup);
let mut h = Harness::builder().with_size(vec2(1100.0, 600.0)).with_max_steps(64).build_eframe(move |cc| {
let mut h = Harness::builder().with_size(size).with_pixels_per_point(pixels_per_point).with_max_steps(64).build_eframe(move |cc| {
let desktop = Desktop::detect(Backend::X11);
let decision = decide(Os::Windows, Runtime::Native, Backend::X11, &desktop, WindowKind::Main, TitleBarPref::Integrated, None);
PhotocraftApp::setup_window(&cc.egui_ctx, Default::default(), decision);
@@ -48,13 +51,13 @@ fn with_unsaved_work(app: &mut PhotocraftApp) {
/// prompt could never be drawn, so Close quits at once.
#[test]
fn the_close_caption_asks_about_unsaved_work_unless_the_device_is_lost() {
let mut h = integrated_app(with_unsaved_work);
let mut h = integrated_app(WINDOW, 1.0, with_unsaved_work);
h.get_by_label("Close").click();
let asks = commands(&mut h, 6);
assert!(!asks.iter().any(|c| matches!(c, ViewportCommand::Close)), "a window that can draw asks first: {asks:?}");
assert!(!h.state().framework.dialogs.is_empty(), "the discard prompt is open");
let mut lost = integrated_app(|app| {
let mut lost = integrated_app(WINDOW, 1.0, |app| {
with_unsaved_work(app);
app.window_lost = true;
});
@@ -66,7 +69,7 @@ fn the_close_caption_asks_about_unsaved_work_unless_the_device_is_lost() {
/// The whole app with the menu bar set as given.
fn whole_app(menu_bar: bool) -> Harness<'static, Box<PhotocraftApp>> {
integrated_app(move |app| app.ui.panels.menu_bar = menu_bar)
integrated_app(WINDOW, 1.0, move |app| app.ui.panels.menu_bar = menu_bar)
}
/// An app that embeds the UI can hide the menu bar; it is on by default. The dock's panels stay either way, and no
@@ -88,10 +91,39 @@ fn the_menu_bar_follows_its_panel_flag() {
/// them stays in a menu: Window › Appearance, Edit › Search and Window › Workspace.
#[test]
fn the_top_bar_has_no_appearance_search_or_workspace_controls() {
let h = integrated_app(|_| {});
let h = integrated_app(WINDOW, 1.0, |_| {});
assert!(h.query_by_label("File").is_some(), "the menus are drawn");
assert!(h.query_by_label("Close").is_some(), "the caption buttons are drawn");
assert!(h.query_by_label("Appearance").is_none(), "no appearance button");
assert!(h.query_by_label_contains("Search commands").is_none(), "no command search button");
assert!(h.query_by_label("Choose a workspace").is_none(), "no workspace switcher");
}
/// Where `text` was painted in the last frame, and whether it was cut.
fn painted(h: &Harness<'static, Box<PhotocraftApp>>, text: &str) -> Option<(egui::Rect, bool)> {
fn find(shape: &egui::Shape, text: &str) -> Option<(egui::Rect, bool)> {
match shape {
egui::Shape::Text(shape) if shape.galley.text() == text => Some((shape.visual_bounding_rect(), shape.galley.elided)),
egui::Shape::Vec(shapes) => shapes.iter().find_map(|shape| find(shape, text)),
_ => None,
}
}
h.output().shapes.iter().find_map(|clipped| find(&clipped.shape, text))
}
/// #15533: in a 1600 × 1000 px window at 125 % (1280 × 800 pt), the menu bar takes its titles' width and leaves the
/// rest of the row to the document title: Help is a menu-bar title, and the title is drawn whole, right of it.
#[test]
fn the_document_title_is_drawn_after_the_last_menu_at_125_percent() {
use egui_kittest::kittest::NodeT as _;
let mut h = integrated_app(vec2(1280.0, 800.0), 1.25, |app| {
app.run("file.new", json!({"width": 8, "height": 8})).unwrap();
});
h.run_steps(2);
let help = h.query_all_by_label("Help").find(|n| n.accesskit_node().role() == egui::accesskit::Role::MenuItem).map(|n| n.rect());
let help = help.expect("Help is a title of the menu bar, not a row of its \"…\" menu");
let title = super::title_text(h.state());
let (drawn, cut) = painted(&h, &title).unwrap_or_else(|| panic!("the document title {title:?} is painted"));
assert!(drawn.left() > help.right(), "the document title {drawn:?} lies after Help {help:?}");
assert!(!cut, "the document title is whole");
}
+4 -6
View File
@@ -1,4 +1,4 @@
use super::{PhotocraftApp, Tool, json, vec2};
use super::{PhotocraftApp, Tool, json};
use craft::behavior::overlay::Side;
use craft::color_ui::ui::{PairWell, SwatchPair, Well};
use craft::ui::contract::{Bind, Gap, Props as _, Show as _, ShowContainer as _, Tracked, clicked};
@@ -183,8 +183,7 @@ fn rail<'a>(
/// The rail's footer: the colour chips, then the Quick Mask and Screen Mode buttons.
fn footer(app: &mut PhotocraftApp, ui: &mut egui::Ui, rail: RailFooter) {
let column = ui.available_width();
color_chips(app, ui, column);
color_chips(app, ui);
let modes = |ui: &mut egui::Ui, app: &mut PhotocraftApp| {
quick_mask_button(app, ui);
ScreenModeButton::new(app.ui.view.screen_mode).show(ui);
@@ -369,10 +368,9 @@ fn chip_pair<'a>(app: &PhotocraftApp, active: &'a mut Well) -> SwatchPair<'a> {
}
/// The colour chips: a click on a chip opens the Color Picker for that colour (Photoshop).
pub(super) fn color_chips(app: &mut PhotocraftApp, ui: &mut egui::Ui, column: f32) {
pub(super) fn color_chips(app: &mut PhotocraftApp, ui: &mut egui::Ui) {
let mut active = Well::Primary;
let layout = egui::Layout::top_down(egui::Align::Center);
let out = ui.allocate_ui_with_layout(vec2(column, 0.0), layout, |ui| chip_pair(app, &mut active).show(ui)).inner;
let Some(out) = Row::new().fill_width().align(RowAlign::Center).show(ui, |ui, _| chip_pair(app, &mut active).show(ui)).inner else { return };
match out.clicked {
Some(Well::Secondary) => {
crate::color_picker_ui::open(app, "background");
@@ -3,6 +3,7 @@
use super::*;
use crate::app::framework::BuildApp;
use egui::vec2;
use std::cell::{Cell, RefCell};
use std::rc::Rc;
@@ -1,5 +1,6 @@
use super::*;
use crate::app::framework::BuildApp;
use egui::vec2;
use egui_kittest::kittest::Queryable;
const HEIGHT: f32 = 360.0;
+43 -34
View File
@@ -12,13 +12,14 @@ use craft::behavior::{DisplayOrder, IconId, ItemSource, SelectionChange};
use craft::theme::variant::Tone;
use craft::ui::buttons::{Button, IconButton};
use craft::ui::choice::Checkbox;
use craft::ui::contract::{Bind, CollectionEvent, Entry, Props as _, Show as _, ShowCollection as _};
use craft::ui::contract::{Bind, CollectionEvent, Entry, Props as _, Show as _, ShowCollection as _, ShowContainer as _};
use craft::ui::dialog::{DialogId, DialogResult, DialogStack, StackDialog, dialog_id};
use craft::ui::display::Text;
use craft::ui::layout_components::Row;
use craft::ui::notices::{Notice, NoticeLayout};
use craft::ui::patterns::form_dialogs::FormDialog;
use craft::ui::pickers::Select;
use craft::ui::runtime::env::Label;
use craft::ui::runtime::env::{Label, with_env};
use craft::ui::tabs::{Tab, TabKind, TabStrip};
use craft::ui::text::TextField;
use serde::{Deserialize, Serialize};
@@ -277,25 +278,29 @@ fn define_page(ui: &mut egui::Ui, layers: &[(u64, String, bool)], state: &mut Va
let method_entries = entries(METHODS);
let mut remove = None;
for (i, def) in state.defs.iter_mut().enumerate() {
ui.push_id(i, |ui| {
ui.horizontal(|ui| {
TextField::new(label(tl!("Name")), Bind::bound(&mut def.name)).show(ui);
if let Some(layer) = Select::new(label(tl!("Layer")), Bind::given(def.layer), &layer_entries).show(ui).value() {
def.layer = *layer;
}
if let Some(ty) = Select::new(label(tl!("Type")), Bind::given(def.ty.clone()), &type_entries).show(ui).value() {
def.ty.clone_from(ty);
}
if def.ty == "pixelReplacement"
&& let Some(method) = Select::new(label(tl!("Method")), Bind::given(def.method.clone()), &method_entries).show(ui).value()
{
def.method.clone_from(method);
}
if IconButton::new(IconId::new("minus")).label(label(tl!("Remove Variable"))).show(ui).clicked() {
remove = Some(i);
}
});
});
with_env(
ui,
|env| env.id_salt = Some(egui::Id::unique(i)),
|ui| {
Row::new().show(ui, |ui, _| {
TextField::new(label(tl!("Name")), Bind::bound(&mut def.name)).show(ui);
if let Some(layer) = Select::new(label(tl!("Layer")), Bind::given(def.layer), &layer_entries).show(ui).value() {
def.layer = *layer;
}
if let Some(ty) = Select::new(label(tl!("Type")), Bind::given(def.ty.clone()), &type_entries).show(ui).value() {
def.ty.clone_from(ty);
}
if def.ty == "pixelReplacement"
&& let Some(method) = Select::new(label(tl!("Method")), Bind::given(def.method.clone()), &method_entries).show(ui).value()
{
def.method.clone_from(method);
}
if IconButton::new(IconId::new("minus")).label(label(tl!("Remove Variable"))).show(ui).clicked() {
remove = Some(i);
}
});
},
);
}
if let Some(i) = remove {
state.defs.remove(i);
@@ -316,7 +321,7 @@ fn data_sets_page(ui: &mut egui::Ui, state: &mut VariablesState) -> Option<usize
state.fill_values();
state.clamp();
let total = state.data_sets.len();
ui.horizontal(|ui| {
Row::new().show(ui, |ui, _| {
if IconButton::new(IconId::new("chevron_left")).label(label(tl!("Previous Data Set"))).enabled(state.cur > 0).show(ui).clicked() {
state.cur -= 1;
}
@@ -344,19 +349,23 @@ fn data_sets_page(ui: &mut egui::Ui, state: &mut VariablesState) -> Option<usize
TextField::new(label(tl!("Name")), Bind::bound(&mut set.name)).show(ui);
for (i, def) in defs.iter().enumerate() {
let Some(value) = set.values.iter_mut().find(|v| v.variable == def.name) else { continue };
ui.push_id(i, |ui| {
ui.horizontal(|ui| {
Text::new(label(&def.name)).show(ui);
match &mut value.value {
Cell::Flag(on) => {
Checkbox::new(Bind::bound(on)).label(label(tl!("Visible"))).show(ui);
with_env(
ui,
|env| env.id_salt = Some(egui::Id::unique(i)),
|ui| {
Row::new().show(ui, |ui, _| {
Text::new(label(&def.name)).show(ui);
match &mut value.value {
Cell::Flag(on) => {
Checkbox::new(Bind::bound(on)).label(label(tl!("Visible"))).show(ui);
}
Cell::Text(text) => {
TextField::new(label(&def.name), Bind::bound(text)).show(ui);
}
}
Cell::Text(text) => {
TextField::new(label(&def.name), Bind::bound(text)).show(ui);
}
}
});
});
});
},
);
}
Button::new(label(tl!("Apply"))).show(ui).clicked().then_some(cur)
}
@@ -12,9 +12,11 @@ use craft::ui::choice::Checkbox;
use craft::ui::contract::{Bind, Entry, Props as _, Show as _, ShowContainer as _};
use craft::ui::display::Text;
use craft::ui::form::Field;
use craft::ui::layout_components::Row;
use craft::ui::patterns::preferences::PathSetting;
use craft::ui::pickers::Select;
use craft::ui::runtime::env::system_appearance;
use craft::ui::sections::Section;
use craft::ui::style::TypeRole;
use craft::ui::text::{NumberField, TextField};
use serde_json::{Value, json};
@@ -153,7 +155,7 @@ fn memory_percent_row(ui: &mut egui::Ui, draft: &mut SettingsDraft) {
let mut on = stored.is_some();
let mut percent = Some(f64::from(stored.unwrap_or(70)));
let (was_on, was) = (on, percent);
ui.horizontal(|ui| {
Row::new().show(ui, |ui, _| {
Checkbox::new(Bind::bound(&mut on)).label(tl!("Memory Usage Percent")).show(ui);
NumberField::new(tl!("Memory Usage Percent"), Bind::bound(&mut percent)).range(1.0..=95.0).unit("%").enabled(on).show(ui);
});
@@ -207,7 +209,7 @@ impl PrefsCustom {
Text::new(line.clone()).show(ui);
}
help(ui, tl!("Applies at next launch."));
egui::CollapsingHeader::new(tl!("Advanced")).show(ui, |ui| {
Section::new(tl!("Advanced")).initially_open(false).show(ui, |ui, _| {
let backend: String = draft.get(GPU_BACKEND).unwrap_or_else(|| "auto".into());
if let Some(next) = choose(ui, tl!("GPU Backend"), "graphics-backend", backend, &choices_of(GPU_BACKEND)) {
draft.set(GPU_BACKEND, &next);
@@ -328,7 +330,7 @@ fn scratch_disks_row(ui: &mut egui::Ui, draft: &mut SettingsDraft) {
let on = disk.get("enabled").and_then(Value::as_bool).unwrap_or(false);
let path = disk.get("path").and_then(Value::as_str).unwrap_or("").to_string();
let path_key = format!("{SCRATCH_DISKS}[{i}].path");
ui.horizontal(|ui| {
Row::new().show(ui, |ui, _| {
let mut next = on;
Checkbox::new(Bind::bound(&mut next)).label(tl!("Enabled")).id_salt(("disk-enabled", i)).show(ui);
if next != on {
+21 -13
View File
@@ -91,6 +91,9 @@ pub(super) fn rules() -> Vec<SettingRule> {
if let Some(label) = label_override(key) {
tweak(&mut rules, &path, |r| r.label(label));
}
if section == "interface" {
tweak(&mut rules, &path, |r| r.group(interface_group(key)));
}
if path == "interface.language" {
let mut pairs: Vec<(String, String)> = vec![("auto".into(), "Auto".into())];
pairs.extend(crate::i18n::Lang::for_picker().into_iter().map(|l| (l.code().to_string(), l.name().to_string())));
@@ -121,14 +124,6 @@ pub(super) fn rules() -> Vec<SettingRule> {
}
}
// Interface groups, in Photoshop's order.
for key in ["canvasColor", "canvasCustomColor", "canvasBorder"] {
tweak(&mut rules, &format!("interface.{key}"), |r| r.group("Appearance"));
}
for key in ["language", "uiFontSize", "uiScale"] {
tweak(&mut rules, &format!("interface.{key}"), |r| r.group("Presentation"));
}
// Drawn elsewhere or not at all: the theme keys follow the Appearance row, View › Rulers sets showRulers, and the
// GPU row draws the adapter, backend and GPU switch together.
for path in [
@@ -153,9 +148,9 @@ pub(super) fn rules() -> Vec<SettingRule> {
if cfg!(target_arch = "wasm32") {
tweak(&mut rules, "performance.lowLatencyDrawing", |r| r.hidden());
}
// WinTab is a Windows-only opt-in, drawn with its note.
// WinTab is a Windows-only opt-in, drawn with its note; the row labels itself.
if cfg!(target_os = "windows") {
tweak(&mut rules, "tools.tabletInput", |r| r.custom());
tweak(&mut rules, "tools.tabletInput", |r| r.custom_rows());
} else {
tweak(&mut rules, "tools.tabletInput", |r| r.hidden());
}
@@ -163,17 +158,19 @@ pub(super) fn rules() -> Vec<SettingRule> {
// Rows the app draws itself (`PrefsCustom`).
for path in [
"performance.memoryUsagePercent",
"performance.memoryUsageMb",
"performance.renderingMode",
"performance.gpuAdapter",
"tools.pressureCurve",
"scratchDisks.disks",
"fileHandling.recentFiles",
"type.favoriteFonts",
"interface.appearanceMode",
] {
tweak(&mut rules, path, |r| r.custom());
}
// Rows that draw their own label or heading, so the window adds none: the Appearance page (Appearance Mode, the
// themes), Rendering Mode's select and the Memory Usage block.
for path in ["interface.appearanceMode", "performance.renderingMode", "performance.memoryUsageMb"] {
tweak(&mut rules, path, |r| r.custom_rows());
}
// The favourite fonts are the user's library, not a Type setting.
tweak(&mut rules, "type.favoriteFonts", |r| r.keep_on_reset());
@@ -189,6 +186,17 @@ pub(super) fn rules() -> Vec<SettingRule> {
rules.into_values().collect()
}
/// The Interface group of `key`: Appearance (the mode, its themes and the canvas), Presentation (language, font size,
/// scale) and Options for the rest, as in Photoshop. Groups show in the order of their first row, so
/// `prefs::Interface` lists its fields in this order.
fn interface_group(key: &str) -> &'static str {
match key {
"appearanceMode" | "darkTheme" | "lightTheme" | "favoriteThemes" | "canvasColor" | "canvasCustomColor" | "canvasBorder" => "Appearance",
"language" | "uiFontSize" | "uiScale" => "Presentation",
_ => "Options",
}
}
/// Changes the rule of `key`, starting one when it has none.
fn tweak(rules: &mut BTreeMap<String, SettingRule>, key: &str, change: impl FnOnce(SettingRule) -> SettingRule) {
let rule = rules.remove(key).unwrap_or_else(|| SettingRule::new(key));
+35 -29
View File
@@ -15,9 +15,11 @@ use craft::keymap::{Builtins, CommandRef, ImportOptions, Keymap, NoneDefined, Ov
use craft::menu::Row;
use craft::menu::shortcuts::{Area, ConflictMode, DialogState, DialogTab, Format, Options, Outcome, ShortcutWords, ShortcutsDialog, kys_error_text};
use craft::ui::choice::Checkbox;
use craft::ui::contract::{Bind, Entry, Props as _, Show as _};
use craft::ui::contract::{Bind, Entry, Props as _, Show as _, ShowContainer as _};
use craft::ui::display::Text;
use craft::ui::layout_components::Row as LayoutRow;
use craft::ui::pickers::Select;
use craft::ui::runtime::env::Env;
use craft::ui::runtime::env::{Env, with_env};
use craft::ui::runtime::windows;
use photocraft_engine::keymap_defs;
use photocraft_engine::prefs::{MenuCustomization, Preferences};
@@ -315,36 +317,40 @@ fn menus_body(ui: &mut egui::Ui, rows: &[Row], draft: &mut MenusDraft) -> bool {
egui::ScrollArea::vertical().auto_shrink([false, false]).show_rows(ui, height, items.len(), |ui, range| {
for row in &items[range] {
let id = row.command.id.as_str();
ui.push_id(id, |ui| {
ui.horizontal(|ui| {
ui.label(format!("{} › {}", row.path.join(" › "), row.label));
// Items that can't be hidden (File › Close, Save…, Edit › Menus…) have no visibility
// control at all, as in the reference application (#5096, #14335).
if MenuCustomization::hideable(id) {
let visible = !draft.hidden.contains(id);
let shown = Checkbox::new(Bind::given(visible)).label(tl!("Visible").to_string()).show(ui);
match shown.events.value() {
Some(&true) => {
draft.hidden.remove(id);
with_env(
ui,
|set| set.id_salt = Some(egui::Id::unique(id)),
|ui| {
LayoutRow::new().show(ui, |ui, _| {
Text::new(format!("{} › {}", row.path.join(" › "), row.label)).show(ui);
// Items that can't be hidden (File › Close, Save…, Edit › Menus…) have no visibility
// control at all, as in the reference application (#5096, #14335).
if MenuCustomization::hideable(id) {
let visible = !draft.hidden.contains(id);
let shown = Checkbox::new(Bind::given(visible)).label(tl!("Visible").to_string()).show(ui);
match shown.events.value() {
Some(&true) => {
draft.hidden.remove(id);
}
Some(&false) => {
draft.hidden.insert(id.to_owned());
}
None => {}
}
Some(&false) => {
draft.hidden.insert(id.to_owned());
}
let current = draft.colors.get(id).map_or("none", String::as_str).to_owned();
let current = COLORS.iter().copied().find(|c| *c == current).unwrap_or("none");
let picked = Select::new(tl!("Color").to_string(), Bind::given(current), &colors).show(ui);
if let Some(&color) = picked.events.value() {
if color == "none" {
draft.colors.remove(id);
} else {
draft.colors.insert(id.to_owned(), color.to_owned());
}
None => {}
}
}
let current = draft.colors.get(id).map_or("none", String::as_str).to_owned();
let current = COLORS.iter().copied().find(|c| *c == current).unwrap_or("none");
let picked = Select::new(tl!("Color").to_string(), Bind::given(current), &colors).show(ui);
if let Some(&color) = picked.events.value() {
if color == "none" {
draft.colors.remove(id);
} else {
draft.colors.insert(id.to_owned(), color.to_owned());
}
}
});
});
});
},
);
}
});
*draft != before
@@ -1736,3 +1736,56 @@ fn integrations_apply_without_a_restart() {
assert!(!super::fields::read_at_launch(&format!("integrations.{key}")), "{key}");
}
}
/// The texts the last frame painted, without a trailing colon, with each one's laid-out rect.
fn painted_texts(h: &egui_kittest::Harness<'static, Box<PhotocraftApp>>) -> Vec<(String, egui::Rect)> {
fn collect(shape: &egui::Shape, out: &mut Vec<(String, egui::Rect)>) {
match shape {
egui::Shape::Text(text) => out.push((text.galley.text().trim_end_matches(':').to_owned(), text.galley.rect.translate(text.pos.to_vec2()))),
egui::Shape::Vec(shapes) => shapes.iter().for_each(|shape| collect(shape, out)),
_ => {}
}
}
let mut out = Vec::new();
h.output().shapes.iter().for_each(|clipped| collect(&clipped.shape, &mut out));
out
}
/// #15553: Preferences › Interface labels Appearance Mode once: the Appearance page draws the row with its own label,
/// and the window adds none.
#[test]
fn the_appearance_mode_row_shows_its_label_once() {
let (_, files) = app_with_store();
let h = prefs_harness(&files, "interface", vec2(1280.0, 800.0), |_| {});
let shown = painted_texts(&h).into_iter().filter(|(text, _)| text == "Appearance Mode").count();
assert_eq!(shown, 1, "\"Appearance Mode\" is painted once");
}
/// #15554: Preferences › Interface shows Appearance (the mode and the canvas), then Presentation (language, font size,
/// scale), then Options, and the rows of all three share one label column.
#[test]
fn the_interface_page_lists_appearance_presentation_then_options_on_one_label_column() {
let (_, files) = app_with_store();
let h = prefs_harness(&files, "interface", vec2(1280.0, 800.0), |_| {});
let texts = painted_texts(&h);
let at = |name: &str| texts.iter().find(|(text, _)| text == name).map(|(_, rect)| *rect).unwrap_or_else(|| panic!("{name:?} is painted"));
let order = ["Appearance", "Appearance Mode", "Canvas color", "Presentation", "Language", "UI font size", "UI scale", "Options", "Show tooltips"];
let tops: Vec<f32> = order.iter().map(|name| at(name).top()).collect();
assert!(tops.windows(2).all(|pair| pair[0] < pair[1]), "top to bottom {order:?}: {tops:?}");
let ends: Vec<f32> = ["Appearance Mode", "Language", "Notification Duration (seconds)"].iter().map(|name| at(name).right()).collect();
assert!(ends.iter().all(|end| (end - ends[0]).abs() < 0.5), "one right-aligned label column: {ends:?}");
}
/// The rows of Preferences › Performance that draw their own label or heading show it once: the window adds no second
/// "Rendering mode" beside the select's own, and no "Memory usage (MB)" beside the Memory Usage heading. Memory Usage
/// Percent's check box shows no text, so the window's label is its only one.
#[test]
fn self_labelled_performance_rows_show_their_label_once() {
let (_, files) = app_with_store();
let h = prefs_harness(&files, "performance", vec2(1280.0, 800.0), |_| {});
let texts: Vec<String> = painted_texts(&h).into_iter().map(|(text, _)| text.to_lowercase()).collect();
let count = |wanted: &dyn Fn(&str) -> bool| texts.iter().filter(|text| wanted(text)).count();
assert_eq!(count(&|t| t == "rendering mode"), 1, "Rendering Mode is labelled once: {texts:?}");
assert_eq!(count(&|t| t.starts_with("memory usage") && t != "memory usage percent"), 1, "Memory Usage is labelled once: {texts:?}");
assert_eq!(count(&|t| t == "memory usage percent"), 1, "Memory Usage Percent is labelled once: {texts:?}");
}
@@ -7,7 +7,8 @@ use std::cell::Cell;
use craft::behavior::{EditEvent, EditEvents, Mixed};
use craft::imaging::ui::curve::{Curve, CurveEditor};
use craft::ui::buttons::Button;
use craft::ui::contract::{Bind, BodyCx, Show as _};
use craft::ui::contract::{Bind, BodyCx, Show as _, ShowContainer as _};
use craft::ui::layout_components::Row;
use photocraft_engine::prefs::PressureCurve;
/// The editor's levels: the plot's whole units, so the points keep their unit-square values as percent.
@@ -40,7 +41,7 @@ pub fn editor(ui: &mut egui::Ui, label: &str, points: &mut Vec<[f32; 2]>) -> Edi
.max_points(PressureCurve::MAX_POINTS)
.fields(false)
.between(|ui: &mut egui::Ui, _: &mut BodyCx<'_>| {
ui.horizontal(|ui| {
Row::new().show(ui, |ui, _| {
for (at, (name, _)) in PRESETS.iter().enumerate() {
if Button::new(tl!(name)).show(ui).clicked() {
preset.set(Some(at));
@@ -2,7 +2,8 @@
use craft::behavior::{ColumnKey, ColumnWidth, DisplayOrder, IconId, ItemSource, Selection};
use craft::ui::buttons::{Button, IconButton};
use craft::ui::contract::{Bind, ColumnSpec, Props as _, Show as _, ShowCollection as _};
use craft::ui::contract::{Bind, ColumnSpec, Props as _, Show as _, ShowCollection as _, ShowContainer as _};
use craft::ui::layout_components::Row as LayoutRow;
use craft::ui::list::ListRow;
use craft::ui::runtime::env::Label;
use craft::ui::table::Table;
@@ -59,7 +60,7 @@ pub(crate) fn body(app: &mut PhotocraftApp, ui: &mut egui::Ui) {
log.iter().map(|r| Row { id: r.id, cells: columns.iter().map(|(key, _)| (ColumnKey::new(key), cell_text(r.values.get(*key)))).collect() }).collect();
let ids: Vec<u64> = rows.iter().map(|r| r.id).collect();
ui.horizontal(|ui| {
LayoutRow::new().show(ui, |ui, _| {
if Button::new(Label::from(tl!("Record Measurements"))).show(ui).clicked() {
let ctx = ui.ctx().clone();
let _ = crate::menus::invoke(app, &ctx, "image.analysis.recordMeasurements", json!({}));
@@ -2,8 +2,9 @@
use craft::behavior::IconId;
use craft::ui::buttons::IconButton;
use craft::ui::contract::{Bind, Props as _, Show as _};
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::runtime::env::Label;
use craft::ui::text::TextField;
use serde_json::json;
@@ -42,7 +43,7 @@ pub(crate) fn body(app: &mut PhotocraftApp, ui: &mut egui::Ui) {
}
let mut moved = None;
let mut delete = false;
ui.horizontal(|ui| {
Row::new().show(ui, |ui, _| {
let step = |ui: &mut egui::Ui, icon: &'static str, name: &str| {
IconButton::new(IconId::new(icon)).label(Label::from(name.to_owned())).enabled(n > 1).show(ui).clicked()
};
+3 -2
View File
@@ -9,9 +9,10 @@
use craft::behavior::IconId;
use craft::theme::variant::Tone;
use craft::ui::contract::{Bind, Entry, Props as _, Show as _};
use craft::ui::contract::{Bind, Entry, Props as _, Show as _, ShowContainer as _};
use craft::ui::display::Icon;
use craft::ui::form::SliderField;
use craft::ui::layout_components::Row;
use craft::ui::pickers::Select;
use craft::ui::primitives::IconSpec;
use photocraft_engine::BrushSettings;
@@ -72,7 +73,7 @@ pub fn rows(ui: &mut egui::Ui, brush: &mut BrushSettings, tolerance_control: &mu
if let Some(control) = size {
set_size_control(brush, &control);
}
ui.horizontal(|ui| {
Row::new().show(ui, |ui, _| {
let picked = Select::new(tl!("Tolerance:"), Bind::given(tolerance_control.clone()), &entries).show(ui).events.committed().cloned();
if let Some(control) = picked {
*tolerance_control = control;
@@ -5,6 +5,7 @@ use craft::behavior::EditEvent;
use craft::draw::ui::gradient::{GradientFill, GradientFillEditor, GradientRef};
use craft::ui::contract::{Bind, ShowContainer as _};
use craft::ui::patterns::presets::PresetState;
use craft::ui::runtime::env::with_env;
use craft::ui::sections::Section;
use photocraft_doc::Layer;
use serde_json::json;
@@ -35,22 +36,26 @@ pub(super) fn show(app: &mut PhotocraftApp, ui: &mut egui::Ui, layer: &Layer) {
let mut events: Vec<EditEvent<GradientFill>> = Vec::new();
let mut requested = None;
let mut pick = None;
ui.push_id(("gradient-properties", document, layer.id.0), |ui| {
// The body can run twice in a pass; only the run that read the input has events, and they are kept.
let _ = Section::new(tl!("Gradient").to_string()).show(ui, |ui, _| {
let mut state = PresetState::<GradientRef>::default();
let out = GradientFillEditor::new(tl!("Gradient").to_string(), Bind::bound(&mut value), &[], Bind::bound(&mut state)).sampled(sampled).show(ui);
if out.events.iter().next().is_some() {
events = out.events.iter().cloned().collect();
}
if out.color_requested.is_some() {
requested = out.color_requested;
}
if out.screen_pick.is_some() {
pick = out.screen_pick;
}
});
});
with_env(
ui,
|set| set.id_salt = Some(egui::Id::unique(("gradient-properties", document, layer.id.0))),
|ui| {
// The body can run twice in a pass; only the run that read the input has events, and they are kept.
let _ = Section::new(tl!("Gradient").to_string()).show(ui, |ui, _| {
let mut state = PresetState::<GradientRef>::default();
let out = GradientFillEditor::new(tl!("Gradient").to_string(), Bind::bound(&mut value), &[], Bind::bound(&mut state)).sampled(sampled).show(ui);
if out.events.iter().next().is_some() {
events = out.events.iter().cloned().collect();
}
if out.color_requested.is_some() {
requested = out.color_requested;
}
if out.screen_pick.is_some() {
pick = out.screen_pick;
}
});
},
);
for event in &events {
match event {
EditEvent::Set { after, .. } | EditEvent::Commit { after, .. } => {
@@ -2202,3 +2202,15 @@ fn ending_the_transform_brings_back_the_tools_options_bar() {
assert!(h.query_by_label("Reverse").is_some(), "after {key:?} the Gradient members are back");
}
}
/// #15548: Free Transform on an unturned, unskewed box shows the horizontal skew as "0", not "-0".
#[test]
fn an_unskewed_box_shows_its_horizontal_skew_as_zero() {
use egui_kittest::kittest::Queryable as _;
let mut h = harness(app_with_square(64, photocraft_geom::Rect::new(8, 8, 24, 24)), egui::vec2(1400.0, 900.0));
h.run_steps(4);
let ctx = h.ctx.clone();
crate::menus::invoke(h.state_mut(), &ctx, "edit.freeTransform", json!({})).unwrap();
h.run_steps(2);
assert_eq!(h.get_by_label("Horizontal skew").value().as_deref(), Some("0"));
}
@@ -217,10 +217,14 @@ fn panel_harness_without_frame_logic(app: Box<PhotocraftApp>) -> Harness<'static
h
}
/// Frames the options bar may take to settle: opening the font list loads the rows' samples over several
/// passes, more of them where the system has more fonts.
const BAR_SETTLE_STEPS: u64 = 64;
fn bar_harness(app: Box<PhotocraftApp>) -> Harness<'static, Box<PhotocraftApp>> {
let _ = photocraft_text::shared();
// As tall as a window, so the bar's popup lists open in full below it.
let mut h = Harness::builder().with_context(app.ctx().clone()).with_size(vec2(1100.0, 600.0)).with_max_steps(16).build_app(
let mut h = Harness::builder().with_context(app.ctx().clone()).with_size(vec2(1100.0, 600.0)).with_max_steps(BAR_SETTLE_STEPS).build_app(
|ui, app: &mut PhotocraftApp| {
ui.horizontal(|ui| show_bar(app, ui));
},
@@ -165,7 +165,7 @@ fn options_bar_hover_previews_with_the_character_picker_also_shown() {
h.run();
h.query_all_by_label("Font family").next().unwrap().type_text("JetBrains Mono");
h.run();
h.get_by_label("JetBrains Mono").hover();
h.get_by_role_and_label(Role::TreeItem, "JetBrains Mono").hover();
h.run();
assert_eq!(font(&mut h), "JetBrains Mono");
h.query_all_by_label("Font family").next().unwrap().hover();
@@ -173,3 +173,63 @@ fn options_bar_hover_previews_with_the_character_picker_also_shown() {
assert_eq!(font(&mut h), "Inter", "leaving the row restores the committed font");
let _ = Role::ComboBox;
}
fn history_len(app: &PhotocraftApp) -> usize {
app.session.active().unwrap().history.entries().len()
}
/// Keys typed into the font search stay there, on the first opening and during an edit session: the first key
/// switches no tool, and no text reaches the type layer.
#[test]
fn typed_keys_stay_in_the_font_search_and_reach_no_tool_or_layer() {
for editing in [false, true] {
let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_max_steps(SETTLE_STEPS).build_eframe(move |cc| {
PhotocraftApp::setup_context(&cc.egui_ctx, crate::theme::AppTheme::pro());
let mut app = PhotocraftApp::with_context(cc.egui_ctx.clone(), photocraft_engine::Session::new(), Services::default());
app.run("file.new", json!({"width": 200, "height": 100})).unwrap();
app.run("type.create", json!({"text": "Sample", "font": "Inter", "size": 18})).unwrap();
app.ui.tool = crate::state::Tool::Type;
if editing {
super::edit_active(&mut app, &cc.egui_ctx).unwrap();
}
app.sync_views();
app
});
h.run_steps(8);
let layers = h.state().session.active().unwrap().doc.layer_count();
field(&h).click();
h.run();
// Native typing carries a key event with the text: a key that left the search would pick a tool (J) or
// replace the edited text.
h.event(egui::Event::Key { key: egui::Key::J, physical_key: Some(egui::Key::J), pressed: true, repeat: false, modifiers: egui::Modifiers::NONE });
h.event(egui::Event::Text("JetBrains".into()));
h.run();
assert_eq!(field(&h).value().as_deref(), Some("JetBrains"), "the search took the keys (editing: {editing})");
assert_eq!(h.state().ui.tool, crate::state::Tool::Type, "no tool shortcut ran (editing: {editing})");
let st = h.state().session.active().unwrap();
let photocraft_doc::LayerContent::Text(text) = &st.doc.layer(st.active_layer.unwrap()).unwrap().content else { panic!("type layer") };
assert_eq!(text.text, "Sample", "the layer's text is unchanged (editing: {editing})");
assert_eq!(st.doc.layer_count(), layers, "no layer was added (editing: {editing})");
}
}
/// Hovering a family previews it on the canvas and adds no history step; picking it commits one step.
#[test]
fn hovering_a_font_adds_no_history_step_and_a_pick_adds_one() {
let mut h = bar_harness(app_with_layer());
h.run_steps(4);
let before = history_len(h.state());
let layer = h.state().session.active().unwrap().active_layer.unwrap();
type_family(&mut h, "JetBrains Mono");
h.get_by_role_and_label(Role::TreeItem, "JetBrains Mono").hover();
h.run();
let (shown, _) = crate::canvas::display_doc(h.state_mut(), 0);
let photocraft_doc::LayerContent::Text(text) = &shown.layer(layer).unwrap().content else { panic!("type layer") };
assert_eq!(text.char_runs()[0].style.font_family, "JetBrains Mono", "the canvas previews the hovered family");
assert_eq!(layer_font(h.state()), "Inter", "hover commits nothing");
assert_eq!(history_len(h.state()), before, "hover adds no history step");
h.get_by_role_and_label(Role::TreeItem, "JetBrains Mono").click();
h.run();
assert_eq!(layer_font(h.state()), "JetBrains Mono");
assert_eq!(history_len(h.state()), before + 1, "the pick is one history step");
}
-92
View File
@@ -1,92 +0,0 @@
//! The part of the window the user can actually see and reach (#315).
//!
//! A window can be larger than its display: PhotoCraft opens at 1440 × 900 pt, which runs past
//! the bottom of a 1366 × 768 screen and under the Windows taskbar. The visible-part rules live in
//! craft-window; [`fit_window`] fixes the cause at startup: a window that doesn't fit its monitor is
//! maximized, which puts it in the work area (Photoshop opens maximized on small displays).
use craft::window::desktop::fits;
fn fitted_id() -> egui::Id {
egui::Id::unique("pc-window-fitted")
}
/// Once, as soon as the monitor is known: maximize a window that is bigger than its monitor
/// (it ran under the taskbar and off-screen). Returns true when it asked to.
pub fn fit_window(ctx: &egui::Context) -> bool {
if ctx.data(|d| d.get_temp::<bool>(fitted_id())).is_some() {
return false;
}
let content = ctx.content_rect();
let (monitor, outer, maximized, fullscreen) = ctx.input(|i| {
let v = i.viewport();
(v.monitor_size, v.outer_rect, v.maximized, v.fullscreen)
});
// On Wayland the window's position, and so its outer rect, is never known (#3737): its content
// size is the least the window takes up.
let outer = outer.unwrap_or(content);
let Some(m) = monitor else { return false };
// macOS keeps new windows inside the screen's visible frame itself.
if cfg!(target_os = "macos") {
return false;
}
ctx.data_mut(|d| d.insert_temp(fitted_id(), true));
if maximized == Some(true) || fullscreen == Some(true) || !m.is_finite() || !outer.is_finite() || fits(outer.size(), m) {
return false;
}
ctx.send_viewport_cmd(egui::ViewportCommand::Maximized(true));
true
}
#[cfg(test)]
mod tests {
use super::*;
use egui::{Rect, Vec2, pos2, vec2};
const MONITOR: Vec2 = vec2(1366.0, 768.0);
fn frame(ctx: &egui::Context, monitor: Option<Vec2>, outer: Option<Rect>, maximized: Option<bool>) -> Vec<egui::ViewportCommand> {
let mut input = egui::RawInput::default();
if let Some(v) = input.viewports.get_mut(&egui::ViewportId::ROOT) {
v.monitor_size = monitor;
v.outer_rect = outer;
v.maximized = maximized;
}
let out = crate::testing::run_ui(ctx, input, |ui| {
fit_window(ui.ctx());
});
out.viewport_output.get(&egui::ViewportId::ROOT).map(|v| v.commands.clone()).unwrap_or_default()
}
#[test]
fn a_window_too_big_for_its_display_is_maximized_once() {
let big = Some(Rect::from_min_size(pos2(0.0, 0.0), vec2(1456.0, 939.0)));
let ctx = egui::Context::default();
// The monitor isn't known on the first frames: wait.
assert!(!frame(&ctx, None, big, Some(false)).contains(&egui::ViewportCommand::Maximized(true)));
let maximize = frame(&ctx, Some(MONITOR), big, Some(false)).contains(&egui::ViewportCommand::Maximized(true));
assert_eq!(maximize, !cfg!(target_os = "macos"));
// Once only: un-maximizing it later is the user's choice.
assert!(!frame(&ctx, Some(MONITOR), big, Some(false)).contains(&egui::ViewportCommand::Maximized(true)));
// A window that fits, or one already maximized, is left alone.
let ctx = egui::Context::default();
assert!(
!frame(&ctx, Some(MONITOR), Some(Rect::from_min_size(pos2(40.0, 40.0), vec2(1200.0, 700.0))), Some(false))
.contains(&egui::ViewportCommand::Maximized(true))
);
let ctx = egui::Context::default();
assert!(!frame(&ctx, Some(MONITOR), big, Some(true)).contains(&egui::ViewportCommand::Maximized(true)));
// Wayland: no outer rect, but a content area bigger than the monitor is maximized too (#3737).
let ctx = egui::Context::default();
let mut input = egui::RawInput { screen_rect: Some(Rect::from_min_size(pos2(0.0, 0.0), vec2(1440.0, 900.0))), ..Default::default() };
if let Some(v) = input.viewports.get_mut(&egui::ViewportId::ROOT) {
v.monitor_size = Some(MONITOR);
v.maximized = Some(false);
}
let out = crate::testing::run_ui(&ctx, input, |ui| {
fit_window(ui.ctx());
});
let cmds = out.viewport_output.get(&egui::ViewportId::ROOT).map(|v| v.commands.clone()).unwrap_or_default();
assert_eq!(cmds.contains(&egui::ViewportCommand::Maximized(true)), !cfg!(target_os = "macos"));
}
}