1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 22:53:14 -04:00

Automatically generate screenshots for all examples (#2379)

This commit is contained in:
Emil Ernerfeldt
2022-12-04 17:27:40 +01:00
committed by GitHub
parent b774159fc8
commit 48666e1d7a
60 changed files with 206 additions and 30 deletions

View File

@@ -9,5 +9,7 @@ publish = false
[dependencies]
eframe = { path = "../../crates/eframe" }
eframe = { path = "../../crates/eframe", features = [
"__screenshot", # __screenshot is so we can dump a ascreenshot using EFRAME_SCREENSHOT_TO
] }
tracing-subscriber = "0.3"

View File

@@ -1,3 +1,7 @@
Example showing some UI controls like `Label`, `TextEdit`, `Slider`, `Button`.
```sh
cargo run -p hello_world
```
![](screenshot.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

@@ -6,7 +6,10 @@ fn main() {
// Log to stdout (if you run with `RUST_LOG=debug`).
tracing_subscriber::fmt::init();
let options = eframe::NativeOptions::default();
let options = eframe::NativeOptions {
initial_window_size: Some(egui::vec2(320.0, 240.0)),
..Default::default()
};
eframe::run_native(
"My egui App",
options,