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

148 Commits

Author SHA1 Message Date
Konkitoman
a5d4ce84d4 Now eframe glow supports viewport sync icon 2023-09-06 19:16:20 +03:00
Konkitoman
fb80880ff8 * Fix posibile deadlock when sending a viewport command from a sync viewport
* Improve viewports example
2023-09-06 16:30:20 +03:00
Konkitoman
b1189c14ae Now when creating a async viewport, if we not spefify the icon will have his parent icon 2023-09-06 15:58:41 +03:00
Konkitoman
83f82601e8 * Fix warnings
* Refactor eframe wgpu
2023-09-06 15:18:18 +03:00
Konkitoman
e44c2e6928 Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports 2023-09-05 16:19:41 +03:00
Emil Ernerfeldt
67168be069 Improve clippy, and add more docs (#3306)
* Silence a few clippy warnings

* Use named threads

* Remove some deprecated functions

* Document Context and Ui fully

* Use `parking_lot::Mutex` in `eframe`

* Expand clippy.toml files

* build fix
2023-09-05 14:11:22 +02:00
Konkitoman
f30bf519ee Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports 2023-09-05 12:19:02 +03:00
Barugon
1b8e8cb38e eframe::Frame::info returns a reference (#3301)
* Get a reference to `IntegrationInfo`

* Add doc comment

* Change `info` to return a reference

* Clone integration info

* Remove `&`

* Clone integration info in another place
2023-09-05 10:43:39 +02:00
Konkitoman
7c4a85ebda Now in ViewportBuilder, InputState, RawInput: viewport_inner_pos, viewport_outer_pos, viewport_inner_size, viewport_outer_size are stored as inner_pos, outer_pos, inner_size, outer_pos and Now every (i32, i32) is stored as egui::Pos2
Addes some documentation
2023-09-04 14:23:21 +03:00
Konkitoman
4a9e087e92 Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports 2023-09-04 13:39:08 +03:00
Emil Ernerfeldt
5f742b9aba Improve documentation of eframe, especially for wasm32 (#3295)
* Improve documentation of `eframe`, especially for wasm32

* remove dead code

* fix
2023-09-04 09:55:47 +02:00
Konkitoman
661120dc1d Simplify 2023-09-01 11:52:00 +03:00
Konkitoman
c10a4cd79a Fix: First frame of Context::create_viewport_sync was always skiped because we didn't have a window to draw on!
Changes: Now Context::create_viewport_sync returns T, before was Option<T>
2023-08-31 17:07:39 +03:00
Konkitoman
6618a47c20 Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports 2023-08-30 15:03:28 +03:00
Emil Ernerfeldt
70bfc7e09f Add eframe::storage_dir (#3286)
* Add `eframe::storage_dir`

Now you can easily tell where eframe stores its state

* egui_plot: work even without the `serde` featur flag
2023-08-29 15:22:07 +02:00
Konkitoman
51011d1bbd Fix: sync viewport was not updating on windows
Changes: no more manual calls to winit:🪟:Window::request_redraw, in glow or wgpu
2023-08-29 11:01:19 +03:00
Konkitoman
4d01644b33 * Fix example hello_world_par
* Added warning for glow eframe when creating `Context::create_viewport_sync` in other thread, or cannot be rendered!
* Fix clippy warning
2023-08-25 11:22:18 +03:00
Konkitoman
3b41253442 This should make the viewport to redraw normaly in windows 2023-08-23 14:31:37 +03:00
Konkitoman
dadcd508c9 Fix deadlock when creating a viewport sync in a viewport sync
But will not affect anything because the viewport builders will processed when the async viewport will end
2023-08-23 07:18:16 +03:00
Konkitoman
189e34e3d2 Fix flickering for Context::create_viewport_sync but now will return a Option<T> 2023-08-23 06:20:31 +03:00
Konkitoman
3f8fe1db3a Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports 2023-08-23 06:10:34 +03:00
lucasmerlin
461328f54d Fix iOS support in eframe (#3241)
* Fix the app only taking up half the screen size on iPad

* Fix request_repaint not working on iOS

* Always use run_and_exit on iOS since run_and_return is not supported by winit on iOS right now.

* Fix typo

* Fix eframe glow on ios

* Handle more cases
2023-08-22 14:35:18 +02:00
Konkitoman
7aefba60df Fix windows and android errors 2023-08-22 11:20:34 +03:00
Konkitoman
8e864bdfbc typo: fix typos 2023-08-22 11:08:56 +03:00
Konkitoman
ab59bf8c88 Now viewports will be identified by there id a normal egui::Id
Before viewports was identified by there title
2023-08-22 10:34:43 +03:00
Konkitoman
013f01dbcb * Now: is_desktop can only be set at the creation with egui::Context::new insted of default!
* Removed: egui::Context::is_desktop, egui::Context::set_desktop
* Added: egui::Context::force_embedding, egui::Context::set_force_embedding
2023-08-22 09:39:41 +03:00
Konkitoman
2919a325d9 Fix Typo 2023-08-19 19:30:49 +03:00
Konkitoman
18575d5931 Fix all warnings 2023-08-15 04:04:52 +03:00
Konkitoman
191ee82c3e Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports 2023-08-15 02:17:12 +03:00
Konkitoman
08f207a0a8 Fix some warnings 2023-08-14 17:59:26 +03:00
Emil Ernerfeldt
6633ecce64 Fix wrong detection of OS (#3238)
We had a bunch of `cfg!(windows)` and `cfg!(macos)` which should
have been `cfg!(target_os = "windows")`.

I wonder what the effects of this PR will be fore Windows 😬
2023-08-12 13:50:31 +02:00
Konkitoman
d33075388c * Implement changes_between_builders
* Now process_viewport_commands was renamed to process_viewports_commands
* Added process_viewport_commands
* eframe glutin backend uses changes_between_builders
2023-08-11 17:39:14 +03:00
Emil Ernerfeldt
dd417cfc1a eframe: Better restore Window position on Mac when on secondary monitor (#3239) 2023-08-11 16:25:22 +02:00
Emil Ernerfeldt
08fb447fb5 Increase MSRV to 1.67 (#3234)
* Bump MSRV to 1.67

* clippy fixes

* cargo clippy: inline format args

* Add `clippy::uninlined_format_args` to cranky lints

* Fix clippy on wasm

* More clippy fixes
2023-08-11 13:54:02 +02:00
Konkitoman
88a7071e74 Moved create_winit_window_builder from crates/eframe/src/native/run.rs to crates/egui-winit/src/lib.rs 2023-08-10 18:53:43 +03:00
Emil Ernerfeldt
1e885abe08 Gracefully catch error saving state to disk (#3230) 2023-08-10 17:28:21 +02:00
Konkitoman
9c6044aa7d Change ViewportBuilder how it's working 2023-08-10 16:53:31 +03:00
Emil Ernerfeldt
d568d9f5d0 Lint vertical spacing in the code (#3224)
* Lint vertical spacing in the code

* Add some vertical spacing for readability
2023-08-10 15:26:54 +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
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
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
Konkitoman
d45fc14a13 Move viewports stuff to crates/egui/src/viewports.rs 2023-08-07 19:02:18 +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
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
e8027b3c3a Removed viewport_id and parent_viewport_id from eframe::Frame 2023-08-04 09:10:01 +03:00