Commit graph

196 commits

Author SHA1 Message Date
Sven Niederberger
7e9c7dac41
Improve plot grid appearance (#2412)
* improve plot grid appearance

* update changelog

* Update crates/egui/src/widgets/plot/mod.rs

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

* address review comments

* make lines a bit weaker

* move changelog entry

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2022-12-19 10:57:30 +01:00
Ivan
f9728b88db
Combobox .wrap(true) width usage (#2472)
* Combobox .wrap(true) width fix

.wrap(true) does note use all the available width
this fix does not change the original .wrap(false) behaviours

* Code comment convention

Co-authored-by: IVANMK-7 <68190772+IVANMK-7@users.noreply.github.com>
2022-12-19 10:55:39 +01:00
francesco-cattoglio
2c9b130423
Add Memory::any_popup_open() (#2464)
* Added the "any_popup_open()" function

* Updated CHANGELOG.md

* add PR link to changelog

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2022-12-19 10:55:27 +01:00
Emil Ernerfeldt
6554fbb151 epaint: Improve rendering of very thin rectangles 2022-12-19 10:33:03 +01:00
Emil Ernerfeldt
6ae4bc486b Add Slider::drag_value_speed 2022-12-15 17:05:43 +01:00
Emil Ernerfeldt
367087f84f Annotate at_least and at_most with #[must_use] 2022-12-15 15:38:31 +01:00
Emil Ernerfeldt
ea5c9483a2
Fix bug in Mesh::split_to_u16 (#2459)
Co-authored-by: Vladislav Zhukov <vlad.zhukov@elektron.se>
2022-12-15 11:13:01 +01:00
Emil Ernerfeldt
37fd141dd1 Rename eframe::EframeError to eframe::Error 2022-12-14 17:29:54 +01:00
Emil Ernerfeldt
4e8341d35c
Don't render the \r (Carriage Return) character, because it sucks (#2452)
* Don't render the \r (Carriage Return) character, because it sucks

* Update PR links

* Fix doclink
2022-12-14 15:15:29 +01:00
Emil Ernerfeldt
df9df39f10 eframe: set_window_size, set_fullscreen and set_window_pos updates info 2022-12-14 14:14:20 +01:00
Emil Ernerfeldt
a70b173333 Toggle fullscreen in egui_demo_app with F11 2022-12-14 14:13:52 +01:00
Matt Campbell
a925511032
Expose the TextEdit multiline flag to AccessKit (#2448)
* Expose the TextEdit multiline flag to AccessKit

* Add changelog entry
2022-12-14 08:37:51 +01:00
Emil Ernerfeldt
126be51ac3 Add Visuals::striped as global default for Grids and Tables 2022-12-13 21:02:39 +01:00
Emil Ernerfeldt
51081d69fc
Maybe fix WSLg (#2439) 2022-12-13 16:06:19 +01:00
Emil Ernerfeldt
0ba2d8ca1d Add Visuals::menu_rounding 2022-12-13 15:44:27 +01:00
Emil Ernerfeldt
4a72abc8ec
Clamp eframe window size to at most the size of the largest monitor (#2445)
This can hopefully fix some reported bugs where
2022-12-13 09:09:36 +01:00
Emil Ernerfeldt
32677a54e4 egui-winit: improve clipboard logging 2022-12-13 09:09:25 +01:00
Emil Ernerfeldt
26eb002270 Remove references to old, fixed Firefox WebGL bug 2022-12-12 21:45:57 +01:00
Emil Ernerfeldt
c58ac86935
egui-wgpu: only depend on epaint (not entire egui) (#2438)
* egui-wgpu: only depend on epaint (not entire egui)

* Update changelog link

* Fix doclinks
2022-12-12 17:25:00 +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
6c4fc50fdf
Make egui_wgpu::winit::Painter::set_window async (#2434)
* Make `egui_wgpu::winit::Painter::set_window` async

* Fix changelog link
2022-12-12 15:37:55 +01:00
Emil Ernerfeldt
7a658e3ddb
Add Event::Key::repeat that is set to true if the event is a repeat (#2435)
* Add `Event::Key::repeat` that is set to `true` if the event is a repeat

* Update changelog

* Improve docstring
2022-12-12 15:37:42 +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
Ryan Hileman
c8dd5d1b2d
egui-wgpu: don't panic if we can't find a device (#2427) (#2428) 2022-12-12 10:36:48 +01:00
Emil Ernerfeldt
059e6f719d egui-winit: don't call set_cursor each frame on any platform
On some platforms (WSL?) the setting of the cursor can also fail,
leading to warnings being logged by winit each frame. Not good.
2022-12-12 10:26:14 +01:00
Red Artist
930ef2db38
fix all clippy lints and remove them from allow list in cranky (#2419)
* manual range contains clippy lint removed from allow list
* removed multiple redundant allowed clippy lints
2022-12-11 19:06:09 +01:00
Emil Ernerfeldt
228f30ed46 Release 0.20.1 of eframe egui-winit egui_glium egui_glow - docs fixes 2022-12-11 17:04:23 +01:00
Emil Ernerfeldt
d7189d69f6 Release 0.20.1 - Fix key-repeat 2022-12-11 16:59:54 +01:00
Emil Ernerfeldt
4e3ae098a9 Improve eframe wasm32 docs 2022-12-11 16:52:37 +01:00
Emil Ernerfeldt
0a1b85f35a
Revert key-repeat behavior (#2429)
* Revert key-repeat behavior

This fixes key-repeats everywhere in egui where it was broken,including:

- Enter in TextEdit:s
- Arrow keys for sliders and dragvalues
- …

* Update changelog

* Remove old comment
2022-12-11 16:26:57 +01:00
bilabila
e7471f1191
Fix drag_value.edit_string unexpected reset (#2421)
* Fix drag_value.edit_string unexpected reset

  solve issue #2418 #2370

* Also reset drag_value.edit_string on click

* Fix for clippy check
2022-12-10 10:05:51 +01:00
Tomoya Matsuura
aca3807e43
Fixed docs comment in web::start (#2422)
* fixed typo in docs

* fixed example code in docs (wrong return type)
2022-12-09 15:09:54 +01:00
Emil Ernerfeldt
32606c2223
Fix docs.rs build issues for eframe, egui-winit, egui_glium, egui_glow (#2420)
* Fix docs.rs build issues for eframe, egui-winit, egui_glium, egui_glow

I hope we can get rid of the `tts` crate very soon,
now that AcessKit has landed. It is only used for web atm.
Should probably be removed from all native libraries.

* Update changelogs
2022-12-09 12:24:47 +01:00
ItsEthra
6cc43dbdd4
Fixed backspace repeat with TextEdit (#2416) 2022-12-09 09:54:00 +01:00
Emil Ernerfeldt
85f615f21c Fix incorrect date in CHANGELOGs 2022-12-09 08:29:44 +01:00
Emil Ernerfeldt
7d91e90481 Release 0.20.0 - AccessKit, prettier text, overlapping widgets 2022-12-08 15:11:54 +01:00
Emil Ernerfeldt
124ef8ddf8 Update poll-promise and unicode_names2 2022-12-08 15:08:59 +01:00
Emil Ernerfeldt
4af7dc9e35 Very small doc and changelog tweaks 2022-12-08 14:49:13 +01:00
Emil Ernerfeldt
da0a178701
Style tweaks (#2406)
* Note the namechange of egui::color to egui::ecolor

* Use a solid triangle for collapsing headers and windows

* Add Shadow::NONE

* Add Visuals::panel_fill, window_fill and window_stroke

* Bug fix: ComboBox::width sets the outer width of the ComboBox

* egui_extras::Table: add functions to access the `Ui` for the header/body

* ComboBox: use solid triangle

* Tweak default menu margin

* Nudge panel separator lines so they stay visible

* Update changelogs
2022-12-08 10:55:13 +01:00
Andreas Reich
5effc68ba4
Split out ecolor crate (#2399)
* split out ecolor crate

* split up ecolor crate in lots of modules

* add changelog notes

* add readme to ecolor

* put clippy::manual_range_contains on cranky allow list

* fix hex color issues

* doc fixes

* more hex_color fixes

* Document features

* Rename hex_color module to avoid warning

* Sort the feature names

* fix link in CHANGELOG.md

* better wording

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2022-12-06 20:42:25 +01:00
Emil Ernerfeldt
e30ac7f91a
Only add glutin dependency if you are using the glow backend (#2402) 2022-12-06 14:29:58 +01:00
Red Artist
9145893066
fix wrong variable name (#2400)
* fix wrong variable name

* fmt
2022-12-06 13:50:58 +01:00
René Rössler
c3932f7f7f
Chrono update (#2397)
* limit day to last day of month if the month or year is changed

* update chrono to 0.4.23, switch to NaiveDate and remove use of deprecated functions.
2022-12-06 11:42:53 +01:00
Luke Jones
be4a5be145
egui_glow: update example to latest glutin (#2396)
This lifts the context handling from commit hash 8eb687c as this does
all the required handling for us that the older glutin once did.
2022-12-06 10:02:20 +01:00
Emil Ernerfeldt
b8a1670781 Change demo keyboard shortcuts to some that work in the browser 2022-12-05 17:57:11 +01:00
Emil Ernerfeldt
a86ec5a749 Remove extra separator in color test 2022-12-05 17:38:38 +01:00
Emil Ernerfeldt
8ae4d49e6e More changelog updates 2022-12-05 17:38:30 +01:00
Mike Krüger
ee2582964d
Added KeyRepeat event. (#2389)
KeyPress no longer repeats.

Co-authored-by: Mike Krueger <mkrueger@posteo.de>
2022-12-05 17:37:25 +01:00
Emil Ernerfeldt
3519358b7b Clippy fix 2022-12-05 13:41:25 +01:00
Emil Ernerfeldt
be6d23eed1 Replace Stroke::none() with Stroke::NONE 2022-12-05 12:59:02 +01:00