Commit graph

2319 commits

Author SHA1 Message Date
YgorSouza
e39410c37f
Make EasyMark numbered lists allow more than 2 digits (#1826)
Co-authored-by: Ygor Souza <ygor.souza@protonmail.com>
2022-08-02 20:35:25 +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
Asger Nyman Christiansen
3eccd341ad
Add depth buffer in native 3D example (#1878)
The `custom_3d_three-d` example does not enable a depth buffer since it is only rendering a triangle. However, if it is used as a starting point for other projects, it is highly likely that a depth buffer is actually needed, therefore I propose to enable it by default.
Also see [this](https://github.com/asny/three-d/issues/268) issue for full context.
2022-08-02 17:31:15 +02:00
Emil Ernerfeldt
10788ccc92
More newlines for improved readability (#1880)
* Add blank lines above all `fn`, `impl`, `struct`, etc
* Even newlines between docstringed struct and enum fields
* Improve some documentation
2022-08-02 17:26:33 +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
2500a60062 Code cleanup and improved docs 2022-07-30 18:40:49 +02:00
Kubik
5fb4efa768
Improve documentation about panel order (#1869) 2022-07-30 17:11:56 +02:00
Emil Ernerfeldt
d659e5d24f Add Shape::hline and Shape::vline 2022-07-30 15:34:24 +02:00
Emil Ernerfeldt
c62f3409bd Fix misnamed variable (content_is_too_small -> content_is_too_large)
See https://github.com/emilk/egui/issues/1376
2022-07-30 15:33:08 +02:00
quietvoid
8997519eb2
Fix valign typo (#1870) 2022-07-30 14:55:34 +02:00
Emil Ernerfeldt
235d77713d Improve README.md files 2022-07-29 16:07:48 +02:00
Emil Ernerfeldt
6de9d89b65 Add emath::exponential_smooth_factor 2022-07-29 16:07:35 +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
Matt Campbell
c6c6d2dc5d
Track the global focus state of the UI (#1859)
* Track the global focus state of the UI

* Fix changelog entries

* Document the new difference between `Response::has_focus` and `Memory::has_focus`
2022-07-29 13:15:26 +02:00
zapp88
36a49ffba9
Add dry run feature for anchor calculation. (#1) (#1856)
* Add dry run feature for anchor calculation. (#1)

This PR resolves issue: emilk#1852
We introduce dry_run flag which makes component invisible until we do second pass of rendering - which allows us to properly calculate position for anchor. (This removes rapid flicker when new window is drawn for the first time).

* Change naming convention and add description
2022-07-29 13:14:28 +02:00
Emil Ernerfeldt
278db1c94b
Fix plot auto bounds (#1865)
* Better estimate the plot bounds for generator functions

Avoid infinities, and sample more densely

* Optimize and improve plot auto-bounds logic

* Fix cropping out of the top/bottom of plots during auto-bounds
2022-07-29 12:32:47 +02:00
Emil Ernerfeldt
97880e18d7 Make egui_demo_app native window size larger by default 2022-07-29 11:14:37 +02:00
Matt Campbell
b3ab31953e
Fix focus behavior when pressing Tab with no focus (#1861) 2022-07-29 10:42:09 +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
Connor Fitzgerald
0571bf67e2
Reset the scissor rect after rendering onto a renderpass (#1858) 2022-07-27 01:09:19 +02:00
Matt Campbell
7a46a23db5
Update MSRV to Rust 1.61.0 (#1846) 2022-07-26 16:50:53 +02:00
Emil Ernerfeldt
2278128e66 Add bacon.toml for https://github.com/Canop/bacon 2022-07-26 11:21:57 +02:00
Emil Ernerfeldt
8e2de26e4e Enable more clippy lints 2022-07-26 11:18:21 +02:00
Emil Ernerfeldt
a7012cf8a6
Use pinned version of wasm-bindgen-cli (#1855)
* Use pinned version of wasm-bindgen-cli

* Update wasm-bindgen to 0.2.82

* Call setup_web.sh from scripts that depends on it
2022-07-25 23:02:10 +02:00
Adam Gąsior
36cdae98df
Add methods for custom number formatting in DragValue and Slider (#1851) 2022-07-25 22:38:24 +02:00
Emil Ernerfeldt
c02fbfe973 Make it easier to disable tts
This is a small step in mitigating https://github.com/emilk/egui/issues/1125
2022-07-25 22:17:52 +02:00
Nolan Darilek
0913c77f3d
Make sliders correctly generate events on change. (#1854) 2022-07-25 22:05:05 +02:00
wayne
74ccde566d
egui_extras: Add Table::stick_to_bottom (#1849) 2022-07-25 15:42:24 +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
cf591da1a0 Use past tense in all changelogs (for consistency) 2022-07-23 23:55:21 +02:00
Emil Ernerfeldt
8b3d218f4b Update changelogs with all changes from all PR:s since 0.18 release 2022-07-23 23:54:13 +02:00
Emil Ernerfeldt
d76d055d49 eframe: only enable puffin feature on egui_glow if glow is enabled 2022-07-22 11:09:27 +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
9f1f0a9038 Add documentation for Layout
Related to https://github.com/emilk/egui/issues/1836
2022-07-22 10:41:14 +02:00
Emil Ernerfeldt
fdc2d1cd6d epaint tessellator: don't emit empty meshes
Closes https://github.com/emilk/egui/issues/1772
2022-07-22 10:25:20 +02:00
Emil Ernerfeldt
77b4bacdf4 Make widget_text module public
Closes https://github.com/emilk/egui/issues/1756
2022-07-21 20:52:50 +02:00
Emil Ernerfeldt
0337d78eaa Fix inpuit requiring ALT key
Common on Mac, maybe other platforms too.

Closes https://github.com/emilk/egui/issues/1795

Bug introduced in https://github.com/emilk/egui/pull/1697
2022-07-21 20:25:53 +02:00
Julian
0338843950
(eframe) add Frame.set_visible (#1808) 2022-07-21 20:16:56 +02:00
Milo Moisson
cbe22a0371
Update the link to the nannou egui integration. (#1827)
The project has now moved to the official repository. The old is an archived repo.
Thanks
2022-07-21 19:43:42 +02:00
Sahil Singh
48d48096eb
Add support for ctrl+h as backspace (#1812) 2022-07-21 19:23:24 +02:00
Emil Ernerfeldt
bf15bb6e19
Use cargo cranky instead of cargo clippy (#1820)
* Use cargo cranky instead of cargo clippy

cargo cranky (https://github.com/ericseppanen/cargo-cranky)
is a new tool that passes lints specified in a Cranky.toml
to cargo clippy.

This is a possible solution to
https://github.com/rust-lang/cargo/issues/5034

* Remove `-W clippy::all` from `check.sh` (rely on `Cranky.toml` instead)
2022-07-20 12:34:19 +02:00
Emil Ernerfeldt
898f4804b7 Enable and fix a bunch more lints 2022-07-11 23:08:48 +02:00
Aiden
e76c919c7e
Added WebGlContextOption for eframe::WebOptions (#1803)
* Added WebGlContextOption for eframe::WebOptions

* Fix doclink

* Fix minor doc issue

Co-authored-by: xxvvii <xuwei@aecg.com.cn>
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2022-07-08 10:40:44 +02:00