mirror of
https://github.com/storytold/designcraft.git
synced 2026-11-12 05:12:39 +00:00
* About: credits tables fit without side-scrolling and their columns resize The Contributors table and the Models table were egui Grids inside a two-way scroll area: they opened wider than the dialog, so they scrolled sideways, and Company and Model sat almost touching. Both are now egui_extras tables. Each column opens at the width of its header and widest cell, the spare width goes to the text columns (Name; Company and Model), and every column edge can be dragged. Widening a column grows the table like a spreadsheet, and only then does it scroll sideways; the header stays put while the rows scroll. Counts and dates are right-aligned and every cell is vertically centred. The sorted column stays highlighted and its direction shows on the toolbar's sort-order button, so headers no longer reserve room for an arrow. The opening widths come from fit_widths, a pure function with unit tests that a fitted table fills its room exactly and that only the text columns give way when room is short. The About dialog opens 820 points wide, so every column fits at its natural width. The workspace egui_extras entry, which no crate used, drops its svg feature, so the table brings in no second SVG renderer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Apply review fixes - crates/ui-egui/src/about.rs - crates/ui-egui/src/credits.rs * Let every credits column be dragged, and refit changed tables The last column was egui's remainder column, which has no drag handle, so it could only be resized from the edge before it. It is now an ordinary column with its own handle. A table keeps its column widths, so switching to a longer name left the Name column at its old width and clipped the text. The table now goes back to the opening fit whenever that fit changes: a longer widest cell or a resized window. Dragged widths are dropped at that point. fit_widths could overflow the room when one column hit the minimum, because the other columns did not take up its share. Columns now give way in proportion to their width above the minimum. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Refit credits tables on what they measure, not the fitted widths Comparing the fitted widths missed the case it was meant for. Name is the only growing column, so a longer name takes its extra width from the spare room and the fit comes out the same: a dragged Name width stayed, clipping the longer name. It could also drop dragged widths by accident. The fit comes from the available width inside the scroll area, which scrolling can nudge, so scrolling a widened table could reset it. The table now compares the natural widths and the clip rect's width, which scrolling does not move. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: aiongg <67543387+aiongg@users.noreply.github.com>
168 lines
9.3 KiB
TOML
168 lines
9.3 KiB
TOML
[workspace]
|
||
resolver = "3"
|
||
members = ["crates/*", "apps/*", "xtask"]
|
||
default-members = ["crates/*", "apps/designcraft", "apps/designcraft-cli", "xtask"]
|
||
|
||
[workspace.package]
|
||
version = "0.17.0"
|
||
edition = "2024"
|
||
license = "MIT OR Apache-2.0"
|
||
rust-version = "1.95"
|
||
repository = "https://github.com/storytold/designcraft"
|
||
|
||
[workspace.dependencies]
|
||
# Shared reader and writer; publish the immutable revision before this consumer.
|
||
craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "92d392cff132eaf53e13afff77f38b5c11b73aa0", version = "=0.1.0", default-features = false }
|
||
# Shared keyboard bindings: chords, overrides, conflicts, egui dispatch, the Keyboard Shortcuts dialog.
|
||
craft-keymap = { git = "https://github.com/storytold/craft-libs", rev = "92d392cff132eaf53e13afff77f38b5c11b73aa0", version = "=0.1.0", features = ["egui", "ui"] }
|
||
# Separations, ink coverage and the ink manager; same revision as craft-pdf and the krilla patch.
|
||
craft-prepress = { git = "https://github.com/storytold/craft-libs", rev = "92d392cff132eaf53e13afff77f38b5c11b73aa0", version = "=0.1.0", features = ["flatten"] }
|
||
# 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 = "c5a1cbfb5f9049f9270955caffb5bee5997aebf7", features = ["egui"] }
|
||
# internal
|
||
designcraft-geom = { path = "crates/geom" }
|
||
designcraft-color = { path = "crates/color" }
|
||
designcraft-doc = { path = "crates/doc" }
|
||
designcraft-fonts = { path = "crates/fonts" }
|
||
designcraft-compose = { path = "crates/compose" }
|
||
designcraft-images = { path = "crates/images" }
|
||
designcraft-render = { path = "crates/render" }
|
||
designcraft-pdf = { path = "crates/pdf" }
|
||
designcraft-idml = { path = "crates/idml" }
|
||
designcraft-epub = { path = "crates/epub" }
|
||
designcraft-pptx = { path = "crates/pptx" }
|
||
designcraft-textimport = { path = "crates/textimport" }
|
||
designcraft-format = { path = "crates/format" }
|
||
designcraft-tools = { path = "crates/tools" }
|
||
designcraft-engine = { path = "crates/engine" }
|
||
designcraft-ui-egui = { path = "crates/ui-egui" }
|
||
designcraft-mcp = { path = "crates/mcp" }
|
||
designcraft-testkit = { path = "crates/testkit" }
|
||
|
||
# foundation
|
||
kurbo = { version = "0.13", features = ["serde"] }
|
||
thiserror = "2"
|
||
serde = { version = "1", features = ["derive", "rc"] }
|
||
serde_json = { version = "1", features = ["float_roundtrip"] }
|
||
log = "0.4"
|
||
# All date/time conversion goes through chrono (no hand-rolled calendar code beyond the 400-year range extension; AGENTS.md).
|
||
chrono = { version = "0.4.45", default-features = false, features = ["std"] }
|
||
proptest = "1"
|
||
rayon = "1"
|
||
unicode-bidi = "0.3"
|
||
unicode-script = "0.5"
|
||
unicode-bidi-mirroring = "0.4"
|
||
unicode-segmentation = "1"
|
||
caseless = "0.2"
|
||
regex = { version = "1", default-features = false, features = ["std", "unicode", "perf"] }
|
||
fancy-regex = "0.19.2"
|
||
tempfile = "3"
|
||
same-file = "1.0.6"
|
||
|
||
# text / rendering / formats
|
||
skrifa = "0.47"
|
||
harfrust = "0.13"
|
||
vello_cpu = "0.2"
|
||
vello_common = { version = "0.2", default-features = false }
|
||
image = { version = "0.25", default-features = false, features = ["png", "jpeg", "webp", "gif", "tiff", "bmp"] }
|
||
# CMYK TIFF samples for PDF export (`image` decodes them to RGB); the version `image` uses.
|
||
tiff = "0.11"
|
||
# SVG (same usvg as krilla-svg).
|
||
resvg = { version = "0.47", default-features = false, features = ["text"] }
|
||
krilla-svg = "=0.8.1"
|
||
# Boolean operations on Bézier paths (Pathfinder).
|
||
flo_curves = "0.8"
|
||
# QR codes (Object › Generate QR Code); MIT.
|
||
qrcodegen = "1.8"
|
||
quick-xml = "0.41"
|
||
zip = { version = "3", default-features = false, features = ["deflate"] }
|
||
# INDD/INDT → IDML conversion for File › Open: storytold/indd-utils, pinned by rev as every other
|
||
# git dependency here is. It parses untrusted INDD files, and `branch = "main"` meant any
|
||
# `cargo update` -- Dependabot runs them -- pulled whatever was on that branch into the parser
|
||
# without review (#1599).
|
||
# (MIT OR Apache-2.0, no dependencies, builds for wasm).
|
||
indd = { git = "https://github.com/storytold/indd-utils", rev = "7f3060e5bce78d21ea70e0d5eacb96edce15dfbe" }
|
||
|
||
# Which paths stored in documents may be followed (craft-libs).
|
||
craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "92d392cff132eaf53e13afff77f38b5c11b73aa0" }
|
||
# Atomic file replacement for saves and exports (craft-libs).
|
||
craft-atomic = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "92d392cff132eaf53e13afff77f38b5c11b73aa0" }
|
||
# File › Print through the system print spooler (craft-libs).
|
||
craft-print = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "92d392cff132eaf53e13afff77f38b5c11b73aa0" }
|
||
|
||
# ICC colour management: working spaces, transforms, black point compensation (craft-libs).
|
||
craft-cms = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "92d392cff132eaf53e13afff77f38b5c11b73aa0" }
|
||
|
||
# ui
|
||
# Shared frontend components; keep this dependency above the engine boundary.
|
||
craft-ui = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "92d392cff132eaf53e13afff77f38b5c11b73aa0", features = ["serde"] }
|
||
# The application bar as the window's title bar (craft-libs).
|
||
craft-window = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "92d392cff132eaf53e13afff77f38b5c11b73aa0", features = ["egui"] }
|
||
egui = "0.37"
|
||
# Resizable table columns (About ▸ Contributors / Models); no image loaders.
|
||
egui_extras = { version = "0.37", default-features = false }
|
||
eframe = { version = "0.37", default-features = false }
|
||
egui_kittest = "0.37"
|
||
# Monotonic clock on native and web (`Instant`); screenshot settlement must not use wall time.
|
||
web-time = "1"
|
||
rfd = "0.17"
|
||
# Native file and message dialogs that never block the event loop (craft-libs).
|
||
craft-dialogs = { git = "https://github.com/storytold/craft-libs", rev = "1a11a4897865f7410c40d25ca6e452ce399a1a2c" }
|
||
raw-window-handle = "0.6"
|
||
arboard = { version = "3.6", default-features = false }
|
||
|
||
[workspace.lints.rust]
|
||
unsafe_code = "forbid"
|
||
|
||
[workspace.lints.clippy]
|
||
cognitive_complexity = "deny"
|
||
too_many_arguments = "deny"
|
||
wildcard_imports = "deny"
|
||
dbg_macro = "warn"
|
||
todo = "warn"
|
||
type_complexity = "allow"
|
||
|
||
# Line tables keep file and line in panics and backtraces; full debug info
|
||
# for every test binary and dependency would multiply the target dir size.
|
||
# The test profile inherits both settings.
|
||
[profile.dev.package."*"]
|
||
opt-level = 2
|
||
debug = false
|
||
|
||
[profile.dev]
|
||
opt-level = 1
|
||
debug = "line-tables-only"
|
||
|
||
[profile.release]
|
||
opt-level = 3
|
||
lto = "thin"
|
||
codegen-units = 16
|
||
debug = 0
|
||
|
||
# Opt-in cancelable macOS termination on the pinned winit 0.30 line.
|
||
[patch.crates-io]
|
||
krilla = { git = "https://github.com/storytold/craft-libs", rev = "92d392cff132eaf53e13afff77f38b5c11b73aa0", version = "=0.8.2" }
|
||
winit = { git = "https://github.com/storytold/winit.git", rev = "a517b3846ee8457d84ee4975110bfda6797c44dc" }
|
||
# The hayro crates from craft-libs' vendor/ directory (pdfcraft's, plus the plate mode and decode
|
||
# limits craft-pdf and craft-prepress need); same revision as craft-pdf.
|
||
hayro = { git = "https://github.com/storytold/craft-libs", rev = "92d392cff132eaf53e13afff77f38b5c11b73aa0", version = "=0.7.1" }
|
||
hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "92d392cff132eaf53e13afff77f38b5c11b73aa0", version = "=0.7.0" }
|
||
hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "92d392cff132eaf53e13afff77f38b5c11b73aa0", version = "=0.7.2" }
|
||
hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "92d392cff132eaf53e13afff77f38b5c11b73aa0", version = "=0.3.0" }
|
||
hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "92d392cff132eaf53e13afff77f38b5c11b73aa0", version = "=0.1.0" }
|
||
hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "92d392cff132eaf53e13afff77f38b5c11b73aa0", version = "=0.1.0" }
|
||
ecolor = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" }
|
||
emath = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" }
|
||
epaint = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" }
|
||
epaint_default_fonts = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" }
|
||
egui = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" }
|
||
egui-winit = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" }
|
||
egui-wgpu = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" }
|
||
egui_glow = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" }
|
||
egui_extras = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" }
|
||
egui_kittest = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" }
|
||
egui_system_font_provider = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" }
|
||
eframe = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" }
|
||
egui_demo_lib = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" }
|
||
egui_inspection = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" }
|