mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 22:53:14 -04:00
* rework loading around `Arc<Loaders>` * use `Bytes` instead of splitting api * remove unwraps in `texture_handle` * make `FileLoader` optional under `file` feature * hide http load error stack trace from UI * implement image fit * support more image sources * center spinner if we know size ahead of time * allocate final size for spinner * improve image format guessing * remove `ui.image`, `Image`, add `RawImage` * deprecate `RetainedImage` * `image2` -> `image` * add viewer example * update `examples/image` + remove `svg` and `download_image` exapmles * fix lints and tests * fix doc link * add image controls to `images` example * add more `From` str-like types * add api to forget all images * fix max size * do not scale original size unless necessary * fix doc link * add more docs for `Image` and `RawImage` * make paint_at `pub` * update `ImageButton` to use new `Image` API * fix double rendering * `SizeHint::Original` -> `Scale` + remove `Option` wrapper * Update crates/egui/src/load.rs Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com> * remove special `None` value for `forget` * Update crates/egui/src/load.rs Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com> * add more examples to `ui.image` + add `include_image` macro * Update crates/egui/src/ui.rs Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com> * update `menu_image_button` to use `ImageSource` * `OrderedFloat::get` -> `into_inner` * derive `Eq` on `SizedTexture` * add `id` to loaders + `is_installed` check * move `images` to demo + simplify `images` example * log trace when installing loaders * fix lint * fix doc link * add more documentation * more `egui_extras::loaders` docs * Update examples/images/src/main.rs Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com> * update `images` example screenshots + readme * remove unused `rfd` from `images` example * Update crates/egui_extras/src/loaders/ehttp_loader.rs Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com> * add `must_use` on `Image` and `RawImage` * document `loaders::install` multiple call safety * Update crates/egui_extras/Cargo.toml Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com> * reshuffle `is_loader_installed` * make `include_image` produce `ImageSource` + update docs * update `include_image` docs * remove `None` mentions from loader `forget` * inline `From` texture id + size for `SizedTexture` * add warning about statically known path * change image load error + use in image button * add `.size()` to `Image` * Update crates/egui_demo_app/Cargo.toml Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com> * add explanations to image viewer ui --------- Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
74 lines
2.0 KiB
TOML
74 lines
2.0 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"]
|
|
image_viewer = ["image", "egui_extras/all-loaders", "rfd"]
|
|
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",
|
|
] }
|
|
rfd = { version = "0.11", optional = true }
|
|
|
|
# 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"
|