mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 22:00:03 -04:00
* add types from proposal * add load methods on `egui::Context` * implement loaders from proposal in `egui_extras` * impl `From<Vec2>` for `SizeHint` * re-export `SizeHint` from `egui` root * rework `svg` example to use new managed `Image` * split loaders into separate files + add logging * add `log_trace` * clean up `RetainedImage` from `svg` example * refactor ehttp loader response to bytes mapping * remove spammy trace * load images even without extension * fix lints * remove unused imports * use `Image2` in `download_image` * use `visuals.error_fg_color` in `Image2` error state * update lockfile * use `Arc<ColorImage>` in `ImageData` + add `forget` API * add `ui.image2` * add byte size query api * use iterators to sum loader byte sizes * add static image loading * use static image in `svg` example * small refactor of `Image2::ui` texture loading code * add `ImageFit` to size images properly * remove println calls * add bad image load to `download_image` example * add loader file extension support tests * fix lint errors in `loaders` * remove unused `poll-promise` dependency * add some docs to `Image2` * add some docs to `egui_extras::loaders::install` * explain `loaders::install` in examples * fix lint * upgrade `ehttp` to `0.3` for some crates * Remove some unused dependencies * Remove unnecessary context clone * Turn on the `log` create feature of egui_extras in all examples * rename `forget` and document it * derive `Debug` on `SizeHint` Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com> * round when converting SizeHint from vec2 Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com> * add `load` module docs * docstring `add_loader` methods * expose + document `load_include_bytes` * cache texture handles in `DefaultTextureLoader` * add `image2` doctest + further document `Image2` * use `Default` for default `Image2` options * update `image2` doc comment * mention immediate-mode safety * more fit calculation into inherent impl * add hover text on spinner * add `all-loaders` feature * clarify `egui_extras::loaders::install` behavior * explain how to enable image formats * properly format `uri` * use `thread::Builder` instead of `spawn` * use eq op instead of `matches` * inline `From<Arc<ColorImage>>` for `ImageData` * allow non-`'static` bytes + `forget` in `DefaultTextureLoader` * sort features * change `ehttp` feature to `http` * update `Image2` docs * refactor loader cache type --------- Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
73 lines
1.9 KiB
TOML
73 lines
1.9 KiB
TOML
[package]
|
|
name = "egui_demo_app"
|
|
version = "0.22.0"
|
|
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
|
license = "MIT OR Apache-2.0"
|
|
edition = "2021"
|
|
rust-version = "1.70"
|
|
publish = false
|
|
default-run = "egui_demo_app"
|
|
|
|
[package.metadata.docs.rs]
|
|
all-features = true
|
|
|
|
[lib]
|
|
crate-type = ["cdylib", "rlib"]
|
|
|
|
|
|
[features]
|
|
default = ["glow", "persistence"]
|
|
|
|
http = ["ehttp", "image", "poll-promise", "egui_extras/image"]
|
|
persistence = ["eframe/persistence", "egui/persistence", "serde"]
|
|
web_screen_reader = ["eframe/web_screen_reader"] # experimental
|
|
serde = ["dep:serde", "egui_demo_lib/serde", "egui/serde"]
|
|
syntax_highlighting = ["egui_demo_lib/syntax_highlighting"]
|
|
|
|
glow = ["eframe/glow"]
|
|
wgpu = ["eframe/wgpu", "bytemuck"]
|
|
|
|
|
|
[dependencies]
|
|
chrono = { version = "0.4", default-features = false, features = [
|
|
"js-sys",
|
|
"wasmbind",
|
|
] }
|
|
eframe = { version = "0.22.0", path = "../eframe", default-features = false }
|
|
egui = { version = "0.22.0", path = "../egui", features = [
|
|
"extra_debug_asserts",
|
|
] }
|
|
egui_demo_lib = { version = "0.22.0", path = "../egui_demo_lib", features = [
|
|
"chrono",
|
|
] }
|
|
log = { version = "0.4", features = ["std"] }
|
|
|
|
# Optional dependencies:
|
|
|
|
bytemuck = { version = "1.7.1", optional = true }
|
|
egui_extras = { version = "0.22.0", optional = true, path = "../egui_extras", features = [
|
|
"log",
|
|
] }
|
|
|
|
# feature "http":
|
|
ehttp = { version = "0.3.0", optional = true }
|
|
image = { version = "0.24", optional = true, default-features = false, features = [
|
|
"jpeg",
|
|
"png",
|
|
] }
|
|
poll-promise = { version = "0.2", optional = true, default-features = false }
|
|
|
|
# feature "persistence":
|
|
serde = { version = "1", optional = true, features = ["derive"] }
|
|
|
|
|
|
# native:
|
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
|
env_logger = "0.10"
|
|
|
|
# web:
|
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
|
wasm-bindgen = "=0.2.87"
|
|
wasm-bindgen-futures = "0.4"
|
|
web-sys = "0.3"
|