1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-27 23:13:13 -04:00
Commit Graph

2767 Commits

Author SHA1 Message Date
hacknus
871041c4e7 Added an example to save plot to image (#2769)
* implement save_plot

* fix for check.sh

* clippy

* add save_plot to Cargo.lock

* adapted for PR #2676 (removes unsafe code)

* add some comments

* implemented the comments from emilk

* update comments in code

* rustfmt

* remove picked_path

* add more comments

* removed unused import

* use `inner.response.rect` as the plot position

* remove plot_location from MyApp members

* sort entries

* Update examples/save_plot/src/main.rs

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>

* use env_logger instead of tracing subscriber

* use env_logger instead of tracing subscriber and combine if let

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2023-08-10 12:35:11 +02:00
Roshan Mehta
01b1b2da76 rotation feature to plot images (#3121) 2023-08-10 09:50:25 +02:00
jacekpoz
f2a58244c8 fix the title not being used when app_id is not set (#3107)
Co-authored-by: jacekpoz <jacekpoz@cock.li>
2023-08-10 09:50:15 +02:00
mauliu
af6419343d fix depth texture init with multisampling (#3207)
Co-authored-by: user <email@NEO.com>
2023-08-09 20:59:36 +02:00
Konkitoman
48646ef521 Update viewports example, and added documentation for Window::default_embedded 2023-08-09 20:16:35 +03:00
Konkitoman
20b3e16f4b Add some documentation 2023-08-09 19:35:17 +03:00
Konkitoman
a88a5cdf83 Fix some warnings 2023-08-09 19:15:35 +03:00
Konkitoman
86ef11c521 Now viewport_id always will be in a ViewportId you cannot create a ViewportId you can only get the main one everywere or get the current viewport id with Context::get_viewport_id 2023-08-09 18:33:59 +03:00
Barugon
f9f9abf749 DragValue: update value on each key press by default (#2880)
* Use `Response::changed` to fix editing issues

* Update comment

* Make update while editing an option

* improve docstring

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2023-08-09 17:13:58 +02:00
Emil Ernerfeldt
abe91b00a4 Improve generate_changelog.py 2023-08-09 17:13:22 +02:00
Emil Ernerfeldt
51da2ac490 Improve documentation of Window/Area::resizable 2023-08-09 17:13:10 +02:00
Emil Ernerfeldt
92593b70fa Changelogs: document that they are updated upon release (not by users) 2023-08-09 17:12:47 +02:00
Steven Weiss
b2b6558c78 Tiny PR: Document available_width() and available_height() (#3130)
* Update ui.rs docs to clarify available_size and co

Added docs to the available_width() and available_height() methods. 

Added a quick note about the wrapping versions of the methods as well.

* fix a couple of typos, and use code-style for doc-links

* fix doclinks

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2023-08-09 17:06:33 +02:00
Agustín Díaz
f2769f3010 Fix dobule "for" typo (#3189) 2023-08-09 16:48:21 +02:00
Nicolas Riebesel
cbdf748a3b egui: Plot Arrows add method to specify tip_size (#3138)
Normally the tip_size will be dependent on the arrow length.
This patch adds a new method to explicitly set the arrow tip size.
2023-08-09 16:47:46 +02:00
thomaseliot
e82ec74c5c epaint: Add ColorImage::from_gray (#3166)
* epaint: Add from_gray_unmultiplied function

* Rename to just `from_gray`

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2023-08-09 16:46:45 +02:00
Ho Kim
35027d3ebe Fix a document: eframe::start_web (#3026)
In `0.22.0`,  `eframe::start_web` has been replaced with `eframe::WebRunner`, which also installs a nice panic hook (no need for `console_error_panic_hook`).
2023-08-09 16:24:32 +02:00
Yuan Chang
20be0847c8 Add into_inner methods. (#3110) 2023-08-09 16:20:59 +02:00
Emil Ernerfeldt
46daaa8a34 Improve PR template 2023-08-09 12:51:22 +02:00
Emil Ernerfeldt
9c15783fab CI: update list of accepted PR labels 2023-08-09 12:51:08 +02:00
Dirk Stolle
9731cfd9cf Update GitHub Actions CI (#3150)
The following updates are performed:
* update actions/checkout to v3
* replace unmaintained actions-rs/toolchain by dtolnay/rust-toolchain
* replace unmaintained actions-rs/cargo by direct invocation of cargo
2023-08-09 12:50:33 +02:00
Stephen M. Coakley
486cff8ac3 Fix panic with persistence without window (#3167)
A window may not always be available and may have already been closed by the time an eframe app is closing. An example of this is Android, where the main activity window may have been stopped or discarded because the app is no longer in the foreground, and then the user decides to close your app without resuming it using the multitasking view.

In this case, skip the window persistence step if it does not exist anymore by the time we are saving the persistence data. Currently eframe will panic with `winit window doesn't exist` instead.
2023-08-09 12:42:43 +02:00
Brian Janssen
67ba4f2811 Add comment explaining Tab button (#2872) 2023-08-09 11:48:54 +02:00
dependabot[bot]
387b075681 Bump xml-rs from 0.8.13 to 0.8.15 (#3145)
Bumps [xml-rs](https://github.com/kornelski/xml-rs) from 0.8.13 to 0.8.15.
- [Changelog](https://github.com/kornelski/xml-rs/blob/main/Changelog.md)
- [Commits](https://github.com/kornelski/xml-rs/compare/0.8.13...0.8.15)

---
updated-dependencies:
- dependency-name: xml-rs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-09 11:15:37 +02:00
Felix Wiegand
d483ac47ba Fix auto_bounds when only one axis has restricted navigation (#3171) 2023-08-09 11:08:04 +02:00
lampsitter
cd917e49f2 Separate text cursor from selection visuals (#3181) 2023-08-09 11:07:40 +02:00
Konkitoman
1a7c4700fd Now embedded is stored on window, and fix crash when we set a window size to 0 2023-08-08 21:18:03 +03:00
Konkitoman
0198b6ae45 Context and Memory now clears unused viewport data 2023-08-08 17:36:50 +03:00
Konkitoman
3ab6ee1116 Fix window interaction, when a sync embedded=false window was shown other embedded windows will not work! 2023-08-08 17:28:28 +03:00
Konkitoman
c68908a6a8 Add embedd button on window is only a button with character - or ^ 2023-08-08 17:19:54 +03:00
Emil Ernerfeldt
0e5f93b65d Add Margin::expand_rect and shrink_rect (#3214)
* Add `Margin::expand_rect` and `shrink_rect`

* fix typo

* Use the new helpers
2023-08-08 11:50:10 +02:00
Emil Ernerfeldt
924a903610 Rename _typos.toml to .typos.toml 2023-08-08 10:34:37 +02:00
Konkitoman
d45fc14a13 Move viewports stuff to crates/egui/src/viewports.rs 2023-08-07 19:02:18 +03:00
Konkitoman
ee2f2a7986 Fix web demo 2023-08-06 10:31:48 +03:00
Konkitoman
085724b685 wgpu implementation for viewport sync 2023-08-06 10:11:57 +03:00
Konkitoman
860160ed05 Some work on wgpu implementation 2023-08-06 09:21:44 +03:00
Konkitoman
05bf0e124a viewport_sync now processes platform output for GlowWinitApp 2023-08-05 17:46:54 +03:00
Konkitoman
7ee80da98c Fix Test3 allways was fallowing the cursour 2023-08-05 17:36:09 +03:00
Konkitoman
e64f335dcc More restoring 2023-08-05 17:32:16 +03:00
Konkitoman
03bc3f4c52 Now viewport_sync will process viewport_commands and will create new viewports if is needed!
Some refactoring now processing viewports_commands is in egui_winit::process_viewport_commands
And creating new windows and cleaning is in GlowWinitApp::process_viewport_builders
2023-08-05 16:11:39 +03:00
Konkitoman
098d94e705 Fix viewports example 2023-08-05 15:34:23 +03:00
Konkitoman
5ca60cad0e Now seting the time of event as the elapsing time from when the app started for sync viewports 2023-08-05 15:27:06 +03:00
Konkitoman
fbcb26827c More cleanup 2023-08-04 10:45:52 +03:00
Konkitoman
172be33b40 More cleaning 2023-08-04 10:27:22 +03:00
Konkitoman
6a7d162d40 Reverted the demos back 2023-08-04 10:18:24 +03:00
Konkitoman
e8027b3c3a Removed viewport_id and parent_viewport_id from eframe::Frame 2023-08-04 09:10:01 +03:00
Konkitoman
d1b00b6fdc Add Window::show_async!
A refactoring of crates/egui/src/containers/window.rs is needed
2023-08-03 20:13:04 +03:00
Konkitoman
1448c5047f Remove viewport_id and parent_viewport_id from Window::show arguments because can be accessed from Context::get_viewport_id and Context::get_parent_viewport_id 2023-08-03 19:53:17 +03:00
Konkitoman
7f791f4bf9 Add Window::embedded 2023-08-03 19:39:51 +03:00
Konkitoman
9e1e0a55a5 Fix interactions for sync viewport 2023-08-03 19:00:26 +03:00