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

Refactor: put each shape into its own file (#5564)

Much easier to navigate the code
This commit is contained in:
Emil Ernerfeldt
2025-01-02 14:55:49 +01:00
committed by GitHub
parent 249f8bcb93
commit cf7150c6a3
14 changed files with 1136 additions and 1112 deletions

View File

@@ -32,7 +32,7 @@ For small things, just go ahead an open a PR. For bigger things, please file an
Browse through [`ARCHITECTURE.md`](ARCHITECTURE.md) to get a sense of how all pieces connects.
You can test your code locally by running `./scripts/check.sh`.
There are snapshots test that might need to be updated.
There are snapshots test that might need to be updated.
Run the tests with `UPDATE_SNAPSHOTS=true cargo test --workspace --all-features` to update all of them.
For more info about the tests see [egui_kittest](./crates/egui_kittest/README.md).
@@ -102,6 +102,7 @@ While using an immediate mode gui is simple, implementing one is a lot more tric
* Avoid double negatives
* Flip `if !condition {} else {}`
* Sets of things should be lexicographically sorted (e.g. crate dependencies in `Cargo.toml`)
* Put each type in their own file, unless they are trivial (e.g. a `struct` with no `impl`)
* Break the above rules when it makes sense