Emil Ernerfeldt
9e41fa021a
eframe: rename render_state
to wgpu_render_state
for added clarity
2022-08-08 12:15:31 +02:00
Emil Ernerfeldt
06adb09fa3
Make stick_to_bottom take a bool argument
2022-08-02 20:34:50 +02:00
Emil Ernerfeldt
263c9bd601
Make use of AppRunnerRef
...
Follow-up to #1650
2022-08-02 17:44:27 +02:00
Stanislav
64496cacb9
Graceful exit from web ( #1650 )
...
Return a handle that can be used to stop a running egui instance.
2022-08-02 17:42:55 +02:00
Emil Ernerfeldt
5d8ef5326b
Change build_demo_web.sh
option from --fast
to --optimize
2022-08-02 09:56:38 +02:00
Emil Ernerfeldt
235d77713d
Improve README.md files
2022-07-29 16:07:48 +02:00
Emil Ernerfeldt
4e8a6e3370
misc code cleanup
2022-07-29 16:07:26 +02:00
Emil Ernerfeldt
b0fa0c65cc
fix typo
2022-07-29 15:56:04 +02:00
Emil Ernerfeldt
2612dd1064
Add Visuals::error_fg_color and Visuals::warn_fg_color
2022-07-29 15:32:32 +02:00
Emil Ernerfeldt
8c09804abd
eframe
: selectively expose parts of the API based on compile target (#1867 )
...
A lot of the `eframe` API is native-only or web-only. With this PR, only the parts that are implemented for each platform is exposed.
This means you'll need to add `#[cfg(target_arch = "wasm32")]` around code that uses the web-parts of the eframe API, and add `#[cfg(not(target_arch = "wasm32"))]` around the parts that are for native/desktop.
2022-07-29 14:37:23 +02:00
Emil Ernerfeldt
51052c08e9
code cleanup: Pos2::new
-> pos2
, Vec2::new
-> vec2
2022-07-29 14:34:26 +02:00
Emil Ernerfeldt
105cb4b8f2
eframe: add function to set, query and toggle fullscreen mode ( #1866 )
...
Closes https://github.com/emilk/egui/pull/674
Adds `NativeOptions:fullscreen`, `Frame::set_fullscreen` and `WindowInfo::fullscreen`.
2022-07-29 14:21:23 +02:00
Emil Ernerfeldt
97880e18d7
Make egui_demo_app native window size larger by default
2022-07-29 11:14:37 +02:00
Emil Ernerfeldt
09d636b089
egui-wgpu: correctly handle viewport rectangle for callbacks
...
This is important for when a callback shape is inside a ScrollArea.
2022-07-29 00:06:08 +02:00
Matt Campbell
7a46a23db5
Update MSRV to Rust 1.61.0 ( #1846 )
2022-07-26 16:50:53 +02:00
Sven Niederberger
0bf9fc9428
Improve plot item UX ( #1816 )
...
* initial work
* changelog entry
* fix CI
* Update egui/src/widgets/plot/items/values.rs
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* Update egui/src/widgets/plot/items/values.rs
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* derive 'FromIterator'
* remove `bytemuck` dependency again and remove borrowing plot points for now
* update doctest
* update documentation
* remove unnecessary numeric cast
* cargo fmt
* Update egui/src/widgets/plot/items/values.rs
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2022-07-24 17:13:12 +02:00
Emil Ernerfeldt
41f31116ce
Layout::left_to_right/right_to_left
now takes the valign as argument
...
Previous default was `Align::Center`.
Closes https://github.com/emilk/egui/issues/1040
Closes https://github.com/emilk/egui/issues/1836
Closes https://github.com/emilk/egui/pull/1837
2022-07-22 11:02:26 +02:00
Emil Ernerfeldt
898f4804b7
Enable and fix a bunch more lints
2022-07-11 23:08:48 +02:00
Emil Ernerfeldt
0f0031ebbb
cargo update ( #1794 )
...
* cargo update
Updating crates.io index
Updating anyhow v1.0.57 -> v1.0.58
Updating arboard v2.1.0 -> v2.1.1
Updating async-broadcast v0.3.4 -> v0.4.0
Updating async-io v1.6.0 -> v1.7.0
Updating async-trait v0.1.53 -> v0.1.56
Updating bindgen v0.59.2 -> v0.60.1
Updating bumpalo v3.9.1 -> v3.10.0
Updating bytemuck v1.9.1 -> v1.10.0
Updating cfg-expr v0.10.2 -> v0.10.3
Updating clang-sys v1.3.1 -> v1.3.3
Adding clap v3.2.8
Adding clap_lex v0.2.4
Updating crossbeam-channel v0.5.4 -> v0.5.5
Updating crossbeam-epoch v0.9.8 -> v0.9.9
Updating crossbeam-utils v0.8.8 -> v0.8.10
Updating dyn-clone v1.0.5 -> v1.0.6
Updating either v1.6.1 -> v1.7.0
Updating enum-map v2.1.0 -> v2.4.0
Updating enum-map-derive v0.8.0 -> v0.9.0
Updating flate2 v1.0.23 -> v1.0.24
Updating getrandom v0.2.6 -> v0.2.7
Updating gif v0.11.3 -> v0.11.4
Adding hashbrown v0.12.1
Updating indexmap v1.8.1 -> v1.9.1
Updating itoa v1.0.1 -> v1.0.2
Updating jpeg-decoder v0.2.4 -> v0.2.6
Updating linked-hash-map v0.5.4 -> v0.5.6
Updating log v0.4.16 -> v0.4.17
Updating memmap2 v0.5.3 -> v0.5.4
Updating miniz_oxide v0.5.1 -> v0.5.3
Updating mio v0.8.2 -> v0.8.4
Removing miow v0.3.7
Adding nix v0.24.1
Removing ntapi v0.3.7
Updating num-rational v0.4.0 -> v0.4.1
Updating num-traits v0.2.14 -> v0.2.15
Updating num_threads v0.1.5 -> v0.1.6
Updating object v0.28.3 -> v0.28.4
Updating once_cell v1.10.0 -> v1.12.0
Adding os_str_bytes v6.1.0
Updating parking_lot v0.12.0 -> v0.12.1
Updating parking_lot_core v0.9.1 -> v0.9.3
Updating proc-macro2 v1.0.37 -> v1.0.40
Updating profiling v1.0.5 -> v1.0.6
Updating puffin v0.13.1 -> v0.13.3
Updating quote v1.0.18 -> v1.0.20
Updating rayon v1.5.2 -> v1.5.3
Updating rayon-core v1.9.2 -> v1.9.3
Updating regex v1.5.5 -> v1.5.6
Updating regex-syntax v0.6.25 -> v0.6.26
Adding remove_dir_all v0.5.3
Updating rfd v0.8.0 -> v0.8.4
Updating rgb v0.8.32 -> v0.8.33
Updating ron v0.7.0 -> v0.7.1
Updating rustls v0.20.4 -> v0.20.6
Updating rustybuzz v0.5.0 -> v0.5.1
Updating ryu v1.0.9 -> v1.0.10
Updating semver v1.0.7 -> v1.0.12
Updating serde v1.0.136 -> v1.0.138
Updating serde_derive v1.0.136 -> v1.0.138
Updating serde_json v1.0.79 -> v1.0.82
Updating serde_repr v0.1.7 -> v0.1.8
Updating smallvec v1.8.0 -> v1.9.0
Adding smithay-client-toolkit v0.16.0
Updating smithay-clipboard v0.6.5 -> v0.6.6
Updating str-buf v1.0.5 -> v1.0.6
Removing strsim v0.8.0
Updating svgtypes v0.8.0 -> v0.8.1
Updating syn v1.0.92 -> v1.0.98
Adding tempfile v3.3.0
Adding textwrap v0.15.0
Updating thiserror v1.0.30 -> v1.0.31
Updating thiserror-impl v1.0.30 -> v1.0.31
Removing time v0.1.43
Removing time v0.3.9
Adding time v0.1.44
Adding time v0.3.11
Updating tiny-skia v0.6.3 -> v0.6.6
Updating tracing v0.1.34 -> v0.1.35
Updating tracing-attributes v0.1.21 -> v0.1.22
Updating tracing-core v0.1.26 -> v0.1.28
Updating tracing-subscriber v0.3.11 -> v0.3.14
Updating ttf-parser v0.15.0 -> v0.15.2
Updating tts v0.20.3 -> v0.20.4
Updating twox-hash v1.6.2 -> v1.6.3
Adding uds_windows v1.0.2
Adding unicode-ident v1.0.1
Updating unicode-normalization v0.1.19 -> v0.1.21
Removing vec_map v0.8.2
Updating wasi v0.10.2+wasi-snapshot-preview1 -> v0.10.0+wasi-snapshot-preview1
Updating wgpu v0.13.0 -> v0.13.1
Updating wgpu-core v0.13.0 -> v0.13.1
Updating wgpu-hal v0.13.0 -> v0.13.1
Removing windows v0.32.0
Adding windows v0.33.0
Adding windows v0.37.0
Updating windows-sys v0.32.0 -> v0.36.1
Removing windows_aarch64_msvc v0.32.0
Adding windows_aarch64_msvc v0.33.0
Adding windows_aarch64_msvc v0.36.1
Adding windows_aarch64_msvc v0.37.0
Removing windows_i686_gnu v0.32.0
Adding windows_i686_gnu v0.33.0
Adding windows_i686_gnu v0.36.1
Adding windows_i686_gnu v0.37.0
Removing windows_i686_msvc v0.32.0
Adding windows_i686_msvc v0.33.0
Adding windows_i686_msvc v0.36.1
Adding windows_i686_msvc v0.37.0
Removing windows_x86_64_gnu v0.32.0
Adding windows_x86_64_gnu v0.33.0
Adding windows_x86_64_gnu v0.36.1
Adding windows_x86_64_gnu v0.37.0
Removing windows_x86_64_msvc v0.32.0
Adding windows_x86_64_msvc v0.33.0
Adding windows_x86_64_msvc v0.36.1
Adding windows_x86_64_msvc v0.37.0
Updating zbus v2.1.1 -> v2.3.2
Updating zbus_macros v2.1.1 -> v2.3.2
Updating zstd v0.10.0+zstd.1.5.2 -> v0.11.2+zstd.1.5.2
Updating zstd-safe v4.1.4+zstd.1.5.2 -> v5.0.2+zstd.1.5.2
Updating zstd-sys v1.6.3+zstd.1.5.2 -> v2.0.1+zstd.1.5.2
Updating zvariant v3.1.2 -> v3.4.1
Updating zvariant_derive v3.1.2 -> v3.4.1
❯ cargo update -p smithay-clipboard --precise 0.6.5
Updating crates.io index
Removing nix v0.24.1
Removing smithay-client-toolkit v0.16.0
Updating smithay-clipboard v0.6.6 -> v0.6.5
* Downgrade enum-map so we can build with rust 1.60
* update syntect
* Update usvg and resvg
* Fix syntect update
* Update tts to 0.22
* Make egui_demo_app compile for wasm with wgpu feature
This broke in https://github.com/emilk/egui/pull/1781
* Ignore rfd tree in deny.toml
* Revert "Update tts to 0.22"
This reverts commit 2e1280b61ef9422c76491ab718ad8da105657097.
* Explain why tts is stuck on an old version
* Downgrade `rfd` to avoid problems with duplicate `windows` crate
2022-07-03 20:12:57 +02:00
Ashley
9739009f20
Update wgpu to 0.13 ( #1670 )
...
* Update the wgsl syntax used in egui-wgpu
* Updates for the latest version of wgpu
* Update the wgpu version
* get_preffered_format -> get_supported_formats
* Just use an array access for compatible formats
* Use the naga cli to validate the egui demo app custom wgpu shader
* Run cargo check on the custom3d wgpu app
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2022-07-03 15:43:39 +02:00
Emil Ernerfeldt
406703568e
Minor clippy fixes (clippy::format_push_string)
2022-07-03 11:58:53 +02:00
Emil Ernerfeldt
eeae485629
Implement repaint_after for eframe web ( #1760 )
...
* Implement repaint_after for eframe web
Follow-up to #1694
* cargo fmt
* Simplify demo UI for "repaint_after"
2022-06-22 14:25:42 +02:00
Red Artist
935913b1ec
Add Context::request_repaint_after ( #1694 )
2022-06-22 13:19:13 +02:00
Emil Ernerfeldt
317436c057
Use dark-light on Mac and Windows ( #1726 )
...
* Use dark-light on Mac and Windows
dark-light has a nasty problem on Linux: https://github.com/frewsxcv/rust-dark-light/issues/17
So we made dark-light opt-in in https://github.com/emilk/egui/pull/1437
This PR makes dark-light a default dependency again,
but only use it on Max and Windows.
This is controlled with the new NativeOptions::follow_system_theme.
If this isn't enabled, then NativeOptions::default_theme is used.
* Add eframe::WebOptions
2022-06-09 17:41:59 +02:00
Zicklag
1d9524cc59
Re-implement PaintCallbacks With Support for WGPU ( #1684 )
...
* Re-implement PaintCallbacks With Support for WGPU
This makes breaking changes to the PaintCallback system, but makes it
flexible enough to support both the WGPU and glow backends with custom
rendering.
Also adds a WGPU equivalent to the glow demo for custom painting.
2022-05-28 17:52:36 +02:00
Emil Ernerfeldt
f3e305a646
Replace TODO:
with TODO(emilk):
and update code guidelines
2022-05-21 16:53:25 +02:00
Sebastian Urban
5687aa6b50
Request GLSL version 3.30. ( #1639 )
2022-05-21 12:52:20 +02:00
Emil Ernerfeldt
aef5942d0f
Make egui_demo_app the default binary, so cargo run
just works
2022-05-12 13:30:35 +02:00
Emil Ernerfeldt
931e716b97
Add egui_wgpu crate ( #1564 )
...
Based on https://github.com/hasenbanck/egui_wgpu_backend
`egui-wgpu` is now an official backend for `eframe` (opt-in).
Use the `wgpu` feature flag on `eframe` and the `NativeOptions::renderer` settings to pick it.
Co-authored-by: Nils Hasenbanck <nils@hasenbanck.de>
Co-authored-by: Sven Niederberger <niederberger@embotech.com>
Co-authored-by: Sven Niederberger <73159570+s-nie@users.noreply.github.com>
2022-05-12 09:02:28 +02:00
Emil Ernerfeldt
32b4781da2
Improve web demo for mobile ( #1556 )
...
`egui_demo_app/lib`: add "About egui" window, and improve mobile layout
This makes the app responsive, removing the side bars on mobile and turning them into drop-down menus instead.
2022-05-02 13:13:35 +02:00
Emil Ernerfeldt
dc26890a80
Release 0.18.0 - Shape::Callback, Table, and better text contrast
2022-04-30 20:27:27 +02:00
Emil Ernerfeldt
003dc4aac9
egui_demo_app: add link to my twitter
2022-04-30 17:50:39 +02:00
Emil Ernerfeldt
051deb293f
mute warning when building for wasm
2022-04-30 17:47:30 +02:00
Emil Ernerfeldt
462ad5a7f6
egui_demo_app: fall back to dark mode if there is no system preference
2022-04-30 17:18:31 +02:00
Emil Ernerfeldt
da2ce58127
egui_demo_app: don't do a transparent native window
...
It doesn't work great on Mac
2022-04-30 15:42:18 +02:00
Emil Ernerfeldt
e1bcaeebe5
App::clear_color: give egui::Visuals as argument
2022-04-30 15:41:43 +02:00
Emil Ernerfeldt
3a83a600bb
Add a custom 3D demo using glow to egui_demo_app ( #1546 )
2022-04-30 12:58:29 +02:00
Emil Ernerfeldt
bb421c7e8a
Remove egui_web
and epi
( #1545 )
...
* Remove integration name (it is always eframe)
* Remove egui_web crate
* Move egui_web/CHANGELOG.md into eframe/CHANGELOG.md
* Remove all mentions of egui_web
* Remove epi crate and absorb into eframe
* egui_glow: only use puffin on native
* Remove WASM doc from CI (we don't generate it anyways!)
* Remove eframe::epi and improve eframe docs
2022-04-30 10:44:35 +02:00
Emil Ernerfeldt
355d70d2b9
Move code from egui_demo_lib
to egui_demo_app
( #1540 )
...
Also clean up feature names and dependencies
2022-04-28 11:23:34 +02:00
Emil Ernerfeldt
a7b6334784
Misc doc improvements
2022-04-13 22:14:34 +02:00
Emil Ernerfeldt
cf0338d48f
Rust 1.60.0 + refactor cargo features ( #1467 )
...
* Update to rust 1.60.0
* Rename the feature `convert_bytemuck` to `bytemuck`
* Rename the feature `serialize` to `serde`.
* Make use of the "weak dependency" cargo feature
* Set rust-version = "1.60" for all crates
* egui_glow: clipboard, links, persistence & winit are now opt-in features
2022-04-09 13:54:47 +02:00
Emil Ernerfeldt
5c68edbb15
Clippy fixes
2022-03-21 22:14:25 +01:00
Emil Ernerfeldt
fda8189cba
Move lints list to .carg/config.toml
( #1394 )
...
That way they apply to all crates equally.
See https://github.com/EmbarkStudios/rust-ecosystem/issues/22 for why.
2022-03-21 16:54:29 +01:00
Emil Ernerfeldt
c69f39e869
Box the app creator ( #1373 )
2022-03-18 14:23:07 +01:00
Emil Ernerfeldt
c8f6cae362
eframe app creation refactor ( #1363 )
...
* Change how eframe apps are created
* eframe: re-export epi::* so users don't need to care about what epi is
2022-03-16 15:39:48 +01:00
Emil Ernerfeldt
510cef02ca
Run a formatter on all toml files
2022-03-10 14:25:33 +01:00
Emil Ernerfeldt
a05520b9d3
Release 0.17.0 - Improved font selection and image handling
2022-02-22 19:32:30 +01:00
Yusuf Bera Ertan
1ebb5ccabf
Don't install console panic hook and tracing wasm subscriber in egui_web ( #1230 )
...
Do so in egui_demo_app instead
2022-02-10 15:44:41 +01:00
Emil Ernerfeldt
0fa4bb9c64
Clean up all Cargo.toml: put features higher, and document them better
2022-02-05 11:11:15 +01:00
Emil Ernerfeldt
c6ac1827f6
Use tracing crate for logging ( #1192 )
...
* egui_web: use tracing crate
* egui_glow: use tracing crate
* Log at the debug level
* egui_demo_app: enable tracing to log to stdout
* Use tracing in egui-winit
* Add opt-in tracing support to egui
2022-02-01 12:27:39 +01:00