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

95 Commits

Author SHA1 Message Date
Emil Ernerfeldt
f5d2bc4e33 auto-grid 2023-05-08 10:58:41 +02:00
Emil Ernerfeldt
e84eef7815 Code cleanup 2023-05-04 21:59:45 +02:00
Emil Ernerfeldt
84356885d1 Fix the bug! 2023-05-04 18:46:30 +02:00
Emil Ernerfeldt
09081cf4fc Nice tab title spacing 2023-05-04 16:13:42 +02:00
Emil Ernerfeldt
6f69a143fe Warn about missing nodes 2023-05-04 16:12:50 +02:00
Emil Ernerfeldt
051ec14b98 Users can add button to the tab bar 2023-05-04 15:42:40 +02:00
Emil Ernerfeldt
065801410a Resize grid 2023-05-04 11:14:30 +02:00
Emil Ernerfeldt
5fc6bfbf49 Resize vertical layouts 2023-05-03 16:36:19 +02:00
Emil Ernerfeldt
e9928c8766 Turn Branch into an enum 2023-04-26 20:31:37 +02:00
Emil Ernerfeldt
9510d3418e Some bugfixes 2023-04-25 23:23:18 +02:00
Emil Ernerfeldt
6563522939 Better re-ordering of grid cells 2023-04-25 21:51:49 +02:00
Emil Ernerfeldt
7b26f3b79f Grid support 2023-04-25 21:27:26 +02:00
Emil Ernerfeldt
e714b33940 Change layout at runtime 2023-04-25 16:26:53 +02:00
Emil Ernerfeldt
ea47d36de7 Refactor: use a single struct Branch 2023-04-25 13:19:24 +02:00
Emil Ernerfeldt
4be5f43a3a Remove NodeState 2023-04-25 12:42:29 +02:00
Emil Ernerfeldt
e5d0cf68d6 Store state 2023-04-25 11:04:58 +02:00
Emil Ernerfeldt
32be36416c You can mandate that all leaves have tabs 2023-04-24 22:37:04 +02:00
Emil Ernerfeldt
13ec65cf08 Fix drag-drop and simplification code 2023-04-24 17:04:10 +02:00
Emil Ernerfeldt
ce7ed11542 bug fixes 2023-04-24 15:44:27 +02:00
Emil Ernerfeldt
b5eddc5d5c Buggy drop-detection 2023-04-24 15:44:27 +02:00
Emil Ernerfeldt
9b154c6d1d Preview drag destinations 2023-04-24 15:44:27 +02:00
Emil Ernerfeldt
52657301c9 dock wip 2023-04-24 15:44:27 +02:00
MAlba124
92c7053a14 Rename examples/user_attention/README.mg to ... (#2948)
Rename `examples/user_attention/README.mg` to `examples/user_attention/README.md`.
2023-04-24 14:28:13 +02:00
Emil Ernerfeldt
4d357b0f02 clippy fixes from 1.69.0 2023-04-21 11:33:18 +02:00
Emil Ernerfeldt
ce761e548f use env_logger in all examples (#2934) 2023-04-19 16:35:38 +02:00
TicClick
e3a021eea6 Allow for requesting the user's attention to the window (#2905)
* add method for requesting attention to the main window

* use another enum member for user attention type instead of nested `Option`s

(also, document the enum members now that they don't mirror `winit`)

* update the docstring

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

* add an example app for testing window attention requests

* Apply suggestions from code review

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

* remove `chrono` dependency and improve the attention example's readability

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2023-04-19 15:29:17 +02:00
Emil Ernerfeldt
9c9a54ce36 Replace tracing with log (#2928)
* Replace tracing crate with log

It's just so much simpler to use

* Add `bacon wasm` job

* eframe: add a WebLogger for piping log events to the web console
2023-04-18 21:11:26 +02:00
Emil Ernerfeldt
af4d737c92 Fix typo. Closes https://github.com/emilk/egui/pull/2876 2023-04-18 16:11:53 +02:00
Emil Ernerfeldt
92c4e23aac eframe: add a simplified native-only API for simple native apps (#2453)
* eframe: add a simplified native-only API for simple native apps

* build-fix

* Fix doc-test
2023-03-30 10:00:47 +02:00
amfaber
870264b005 eframe: capture a screenshot using Frame::request_screenshot
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2023-03-29 16:34:22 +02:00
c-git
2946ed74e3 Update serial window example (#2756)
* Update to make it more clear what will happen

* Provide an overview in readme of expectations

* Update screenshot to match new code
2023-03-29 15:55:45 +02:00
Emil Ernerfeldt
e3e781ced8 fix puffin_profiler example 2023-02-12 19:27:10 +01:00
Emil Ernerfeldt
530e9f667c format: add some blank lines where it was needed 2023-02-10 18:03:46 +01:00
Emil Ernerfeldt
1581f0229e examples/README.md: explain that the examples are for master
and add a link to the latest release
2023-02-08 20:34:43 +01:00
Emil Ernerfeldt
63fa3aec10 Update example screenshots 2023-02-08 19:04:04 +01:00
Emil Ernerfeldt
449dd1c23c cargo update (#2697)
* cargo update

    Updating anyhow v1.0.68 -> v1.0.69
    Updating bindgen v0.63.0 -> v0.64.0
    Removing cocoa v0.24.1
    Updating glutin v0.30.3 -> v0.30.4
    Updating glutin_egl_sys v0.3.1 -> v0.4.0
    Updating glutin_glx_sys v0.3.0 -> v0.4.0
    Updating glutin_wgl_sys v0.3.0 -> v0.4.0
    Updating proc-macro2 v1.0.50 -> v1.0.51
    Updating rgb v0.8.34 -> v0.8.35
    Updating serde_json v1.0.91 -> v1.0.92
    Updating tiny-skia v0.8.2 -> v0.8.3
    Updating tiny-skia-path v0.8.2 -> v0.8.3
    Removing windows-sys v0.36.1
    Removing windows_aarch64_msvc v0.36.1
    Removing windows_i686_gnu v0.36.1
    Removing windows_i686_msvc v0.36.1
    Removing windows_x86_64_gnu v0.36.1
    Removing windows_x86_64_msvc v0.36.1
    Updating zbus v3.8.0 -> v3.9.0
    Updating zbus_macros v3.8.0 -> v3.9.0

* Update wasm-bindgen to 0.2.84

* cargo update

    Updating js-sys v0.3.60 -> v0.3.61
    Updating wasm-bindgen-futures v0.4.33 -> v0.4.34
    Updating web-sys v0.3.60 -> v0.3.61

* Update pollster to 0.3

* Update rfd to 0.11

* Make sure we never depend on cmake
2023-02-08 18:11:34 +01:00
Emil Ernerfeldt
636a39cbe1 Update glow to 0.12 (#2695)
* Remove three-d example due to glow incompatibility

* Update to glow 0.12

* Remove three-d from deny.toml

* Add line to changelog
2023-02-08 17:16:44 +01:00
Emil Ernerfeldt
a8d5a82a7f Lowe multisampling in examples from 8 to 4
Closes https://github.com/emilk/egui/issues/2658
2023-02-08 10:14:43 +01:00
Emil Ernerfeldt
cef0c0b6d8 Fix typo 2023-02-05 21:58:15 +01:00
Emil Ernerfeldt
d5dcc87ace Improve custom_window_frame 2023-02-05 21:58:15 +01:00
Emil Ernerfeldt
660566c499 eframe: ask if the window is minimized or maximized (#2672)
* eframe: ask if the window is minimized or maximized

* Improve note
2023-02-04 16:05:23 +01:00
SunDoge
f0718a61d3 eframe: add set_minimized and set_maximized (#2292)
* add actions for window controls

* add maximized to WindowInfo
update button text
fix clippy

* add overlap icon when maximized

* remove argument `app`

* remove WindowInfo { maximized }

* Update minimum window size

* Double-click titlebar to toggle maximized state

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2023-02-04 14:42:42 +01:00
Andreas Reich
8aa07e9d43 Clear color values are now explicitely sent to the rendering backend as-is. (#2666)
* Clear color values are not explicitely sent to the rendering backend as-is.
Previously, converting from Color32 to Rgba caused an srgb->linear conversion. This conversion is incorrect if the backbuffer doesn't perform automatic conversion from linear->srgb (lack of this conversion is generally what egui assumes!).

* fill in pr numbers in changelog

* Epi comment fix

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

* Color32 comment fix

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

* move changelog line

* rename fix

* use backticks in doc

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2023-02-04 11:02:15 +01:00
Emil Ernerfeldt
8ce0e1c520 Avoid deadlocks by using lambdas for context lock (#2625)
ctx.input().key_pressed(Key::A) -> ctx.input(|i| i.key_pressed(Key::A))
2023-01-25 10:24:23 +01:00
RadonCoding
ce5472633d Fix close button not working (#2533)
* Fix close button not working

By adding the close button after the title bar drag listener the close button will sense clicks.

* Update main.rs
2023-01-23 09:55:57 +01:00
apoorv569
0eabd894bd Fix typo in cargo run command. (#2582)
I think someone by mistake wrote `cargo run -p hello_world` instead of `cargo run -p keyboard_events`.
2023-01-17 10:58:38 +01:00
Emil Ernerfeldt
37fd141dd1 Rename eframe::EframeError to eframe::Error 2022-12-14 17:29:54 +01:00
Emil Ernerfeldt
e0b5bb17e5 Improve the look of thin lines, making them look weaker (#2437)
* Revert "fix all clippy lints and remove them from allow list in cranky (#2419)"

This reverts commit 930ef2db38.

* Explain the cranky lints better

* Add Color32::gamma_multiply

* Remove unused pub use

* Remove non-existing crate category

* Improve color test with more lines

* Improve the look of thin lines, making them look weaker

Before they looked were too strong for the thickness.

* Use asserts for shader compilations

* Update changelogs
2022-12-12 16:18:05 +01:00
Emil Ernerfeldt
cb77458f70 eframe error handling (#2433)
* eframe::run_native: return errors instead of crashing

* Detect and handle glutin errors

* egui_demo_app: silence wgpu log spam

* Add trace logs for why eframe is shutting down

* Fix: only save App state once on Mac

* Handle Winit failure

* Log where we load app state from

* Don't panic on zero-sized window

* Clamp loaded window size to not be too tiny to see

* Simplify code: more shared code in window_builder

* Improve code readability

* Fix wasm32 build

* fix android

* Update changelog
2022-12-12 15:16:32 +01:00
Emil Ernerfeldt
124ef8ddf8 Update poll-promise and unicode_names2 2022-12-08 15:08:59 +01:00