Commit Graph

44 Commits

Author SHA1 Message Date
Mikolaj Wielgus 640247a675 fix(topola-egui): clamp timestep slider to 0.001-3.0 instead of 0.0-3.0
Timestep should never be set to 0 because this freezes the GUI if the
execution takes a long time.

Of course, this solution assumes that any lengthy operation is split
into sufficiently fine steppable steps.

Fixes https://codeberg.org/topola/topola/issues/203
2025-04-26 04:02:06 +02:00
Mikolaj Wielgus b736aa2d7d refactor(layout::poly): use `MakeRef<...>` to obtain poly's ref-struct 2025-04-22 21:59:45 +02:00
Ellen Emilia Anna Zscheile bf1addbdaf chore: fix some more clippy warnings 2025-03-31 01:58:34 +02:00
Ellen Emilia Anna Zscheile 112cc0686d feat(egui): partially disable menus again
The upstream bug got fixed: https://github.com/emilk/egui/issues/4774#event-16792829596
2025-03-18 04:37:48 +01:00
Mikolaj Wielgus f7ac667e1d chore(cargo): bump `icu_experimental` dependency version to 0.3.0-beta2
This should fix the CI failure.
2025-03-10 04:35:34 +01:00
Mikolaj Wielgus 946afc413d chore(cargo): bump `icu_locale_core` dependency version to 2.0.0-beta2 2025-03-10 03:10:06 +01:00
Ellen Emilia Anna Zscheile da3be763c6 feat(overlay,viewport): generation and rendering of topological navmesh 2025-03-04 02:47:04 +01:00
Ellen Emilia Anna Zscheile 2e4b3b52ab chore: cargo fmt 2025-02-10 11:28:19 +01:00
Ellen Emilia Anna Zscheile e1d875ae72 chore: fix most warnings 2025-02-10 11:25:55 +01:00
Ellen Emilia Anna Zscheile 65c8dee0f2 deps: bump dependencies of topola-egui 2025-02-10 00:20:02 +01:00
Ellen Emilia Anna Zscheile 3bd1935f41 deps: make 'log' a workspace dependency 2025-02-10 00:15:53 +01:00
Ellen Emilia Anna Zscheile cf36177097 refactor: don't export modules only containing a single item 2025-02-02 22:03:12 +00:00
Ellen Emilia Anna Zscheile ffb0c94080 refactor(egui::overlay): get rid of constant 'active_layer' 2025-02-02 01:11:29 +01:00
Ellen Emilia Anna Zscheile 58876c996a chore: run cargo upgrade 2025-01-11 10:46:34 +01:00
Ellen Emilia Anna Zscheile ea6df23b95 feat(selection): BBox selection should span all currently visible layers
In Via, is_in_layer, `from_layer` and `to_layer` were swapped,
this has been also fixed here.
2025-01-09 18:59:07 +00:00
hakki 7bef759209 chore(egui): filter dsn files on DSN file dialog 2025-01-09 18:30:11 +01:00
Mikolaj Wielgus babe531f73 feat(egui): move View menu code to actions 2025-01-06 23:40:28 +01:00
Mikolaj Wielgus ebeaaf04c9 Revert "feat(egui): begin development of `egui-actions` crate"
This reverts commit 658e556a4a.

On the second thought, this may be a bad idea because using this crate
on Topola's main library code would pollute it with `egui` code.
2025-01-06 22:42:13 +01:00
Mikolaj Wielgus 658e556a4a feat(egui): begin development of `egui-actions` crate
The purpose of this new crate is to provide a system for managing
actions that can be bound to a key and to derive `egui` menus to invoke
them.

I haven't moved all relevant code from `topola-egui` (in particular,
`Switch` and `Trigger` structs) to this crate yet.
2025-01-06 18:28:56 +01:00
Alain Emilia Anna Zscheile 0cbd3c398a refactor(drawing,layout): move 'is_node_in_layer' from Layout to Drawing 2025-01-05 22:14:00 +00:00
Alain Emilia Anna Zscheile c7d50fd79f refactor(geometry::poly): PolyShape should be equal to Polygon 2025-01-05 22:14:00 +00:00
Alain Emilia Anna Zscheile 740019e2e5 feat(selection): BboxSelectionKind (completely inside vs. merely intersects) 2025-01-05 22:14:00 +00:00
Mikolaj Wielgus 9664f1a31a fix: get rid of some indeterminism by using B-trees instead of hash maps
I have replaced all instances of `HashMap<...>` with `BTreeMap<...>`,
of `HashSet<...>` with `BTreeSet<...>`, and all the uses of the `Hash`
trait with `Ord`.

I have done a few manual tests and found the behavior to be
deterministic between the GUI application launches. However, undoing an
autoroute command and then manually executing it once again continues to
produce variable results. I suppose this is because of some bug in the
code where edits are applied. Hence, the issue

https://codeberg.org/topola/topola/issues/46

is only partially resolved.
2025-01-04 01:56:00 +01:00
Alain Emilia Anna Zscheile 53b964b865 feat: implement bounding box selection (#139)
Fixes #138

Reviewed-on: https://codeberg.org/topola/topola/pulls/139
Co-authored-by: Alain Emilia Anna Zscheile <fogti+devel@ytrizja.de>
Co-committed-by: Alain Emilia Anna Zscheile <fogti+devel@ytrizja.de>
2025-01-02 22:12:11 +00:00
Alain Emilia Anna Zscheile 3dd60ed7df deps(egui): fix missing required feature "async-std" for rfd/xdg-portal
Error message:

   Compiling rfd v0.15.1
error: failed to run custom build command for `rfd v0.15.1`

Caused by:
  process didn't exit successfully: `[redacted]/topola/target/debug/build/rfd-91f81cc3d21cf4fd/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at [redacted]/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rfd-0.15.1/build.rs:21:21:
  One of the `tokio` or `async-std` features must be enabled to use `xdg-portal`
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2025-01-01 22:42:30 +01:00
Alain Emilia Anna Zscheile 7f48888c14 docs(INSTALL): native run-time dependencies 2025-01-01 13:38:00 +01:00
Alain Emilia Anna Zscheile 1f7c6eafc7 chore(egui/menu_bar): fix nitpicks 2024-12-31 13:36:07 +01:00
Alain Emilia Anna Zscheile 44bcdbc0aa refactor(egui/menu_bar): remove unused `self` argument 2024-12-31 13:36:07 +01:00
Alain Emilia Anna Zscheile f454e248d7 refactor(egui/actions): put menu rendering into `actions` module 2024-12-31 13:35:20 +01:00
Alain Emilia Anna Zscheile b47459b3d7 refactor(egui/action): `into_*` methods instead of wrapping `::new` calls 2024-12-31 12:38:18 +01:00
Mikolaj Wielgus 44c30caafe chore(licensing): add REUSE license headers to `**.{rs,md,toml}` files
I ran the following command in Fish shell:

```
reuse annotate --skip-unrecognised --copyright="Topola contributors" --license="MIT" **.{rs,md,toml}
```

The choice of year 2024 in the copyright statements is intentional.
2024-12-29 22:47:00 +01:00
Mikolaj Wielgus 1567a9a83e style: rename "squeeze through under bands" to "(...) bends"
Everywhere except in translatable strings. I'm not changing these
because I prefer this to be done via Weblate.
2024-12-29 01:43:36 +01:00
Alain Emilia Anna Zscheile 9e0bdb5bc7 refactor: various further refactorings (#128)
These optimize out unnecessary code duplication, reserve vector capacity beforehand by leveraging `Iterator`s and avoid unnecessary double-lookups into HashMaps.

Reviewed-on: https://codeberg.org/topola/topola/pulls/128
Co-authored-by: Alain Emilia Anna Zscheile <fogti+devel@ytrizja.de>
Co-committed-by: Alain Emilia Anna Zscheile <fogti+devel@ytrizja.de>
2024-12-11 14:13:21 +00:00
Mikolaj Wielgus 0184a6537e feat(egui): have a separate layout color theme for light mode 2024-12-09 14:22:38 +01:00
Mikolaj Wielgus a5503de0a2 feat(egui): use smaller color theme toggle like in Egui's demo 2024-12-09 14:22:38 +01:00
Mikolaj Wielgus 4b16285143 refactor(egui): move layer colors to `Config` 2024-12-09 14:22:38 +01:00
hakki 5425ac2d3a egui: fixed typo in build 2024-12-08 13:56:59 +01:00
Mikolaj Wielgus 2337576245 refactor(egui): rename "layers" to "appearance panel" 2024-12-08 02:22:12 +01:00
Alain Emilia Anna Zscheile 0fe23c9c71 build: put `specctra` module into separate crate 2024-12-06 14:38:00 +01:00
Alain Emilia Anna Zscheile e77a034634 chore: bump dependencies (mostly geo, thiserror) 2024-12-05 19:17:43 +01:00
Mikolaj Wielgus 848a497991 fix(egui): show ratsnest by default
Closes https://codeberg.org/topola/topola/issues/118
2024-12-05 07:47:21 +01:00
Alain Emilia Anna Zscheile e0de008f51 build/deps(egui): bump icu_experimental to v0.2; replace icu_locid -> icu_locale_core 2024-11-28 21:28:29 +01:00
Alain Emilia Anna Zscheile 070fe2c176 build(egui): depend on icu_{experimental,locid} directly to reduce deps 2024-11-28 17:19:18 +01:00
Alain Emilia Anna Zscheile cbd3c77821 build/refactor: move secondary crates into 'crates' folder named by crate name 2024-11-20 15:44:02 +01:00