Skip to content

Commit da39198

Browse files
authored
Some minor docs improvements (#7614)
1 parent cfca7eb commit da39198

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

crates/egui/src/gui_zoom.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Helpers for zooming the whole GUI of an app (changing [`Context::pixels_per_point`].
1+
//! Helpers for zooming the whole GUI of an app (changing [`Context::pixels_per_point`]).
22
//!
33
use crate::{Button, Context, Key, KeyboardShortcut, Modifiers, Ui};
44

crates/egui_kittest/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ This is so that you can set `UPDATE_SNAPSHOTS=true` and update all tests, withou
5050
If you want to update all snapshot images, even those that are within error margins,
5151
run with `UPDATE_SNAPSHOTS=force`.
5252

53-
If you want to have multiple snapshots in the same test, it makes sense to collect the results in a `Vec`
54-
([look here](https://github.com/emilk/egui/blob/70a01138b77f9c5724a35a6ef750b9ae1ab9f2dc/crates/egui_demo_lib/src/demo/demo_app_windows.rs#L388-L427) for an example).
53+
If you want to have multiple snapshots in the same test, it makes sense to collect the results in a `SnapshotResults`
54+
([look here](https://github.com/emilk/egui/blob/d1fcd740ded5d69016c993a502b52e67f5d492d7/crates/egui_demo_lib/src/demo/demo_app_windows.rs#L387-L420) for an example).
5555
This way they can all be updated at the same time.
5656

5757
You should add the following to your `.gitignore`:
@@ -67,7 +67,7 @@ You should add the following to your `.gitignore`:
6767
* …they are brittle since unrelated side effects (like a change in color) can cause the test to fail
6868
* …images take up repo space
6969
* images should…
70-
* …be checked in or otherwise be available (egui use [git LFS](https://git-lfs.com/) files for this purpose)
70+
* …be checked in or otherwise be available (egui uses [git LFS](https://git-lfs.com/) files for this purpose)
7171
* …depict exactly what's tested and nothing else
7272
* …have a low resolution to avoid growth in repo size
7373
* …have a low comparison threshold to avoid the test passing despite unwanted differences (the default threshold should be fine for most usecases!)

crates/egui_kittest/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ impl Display for ExceededMaxStepsError {
5252
}
5353

5454
/// The test Harness. This contains everything needed to run the test.
55+
///
5556
/// Create a new Harness using [`Harness::new`] or [`Harness::builder`].
5657
///
5758
/// The [Harness] has a optional generic state that can be used to pass data to the app / ui closure.

crates/egui_kittest/src/snapshot.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ pub struct SnapshotOptions {
2626
}
2727

2828
/// Helper struct to define the number of pixels that can differ before the snapshot is considered a failure.
29+
///
2930
/// This is useful if you want to set different thresholds for different operating systems.
3031
///
3132
/// The default values are 0 / 0.0

scripts/docs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ script_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
44
cd "$script_path/.."
55

66
cargo doc -p eframe --target wasm32-unknown-unknown --lib --no-deps
7-
cargo doc -p emath -p epaint -p egui -p eframe -p egui-winit -p egui_extras -p egui_glow --lib --no-deps --all-features --open
7+
cargo doc -p emath -p epaint -p egui -p eframe -p egui-winit -p egui_extras -p egui_glow -p egui_kittest --lib --no-deps --all-features --open
88

99
# cargo watch -c -x 'doc -p emath -p epaint -p egui --lib --no-deps --all-features'

0 commit comments

Comments
 (0)