Commit graph

1348 commits

Author SHA1 Message Date
Nolan Darilek
9fe465cc4a Various fixes.
* Only dispatch `SelectionChanged` if the selection actually changes.
* Fix missing focus events.
2021-05-20 12:43:03 -05:00
Nolan Darilek
4fa1e82129 Invert parameters. 2021-05-20 12:43:03 -05:00
Nolan Darilek
68499cebf6 Use a RangeInclusive for text selection. 2021-05-20 12:43:03 -05:00
Nolan Darilek
875d3a650d s/text_value/current_text_value/ 2021-05-20 12:43:03 -05:00
Nolan Darilek
ff9059fe68 Fix typo. 2021-05-20 12:43:02 -05:00
Nolan Darilek
131525536b Get rid of has_widget_info and push events directly where it makes sense. 2021-05-20 12:43:02 -05:00
Nolan Darilek
fa18727933 Move prev_text off of the widget struct. 2021-05-20 12:43:02 -05:00
Nolan Darilek
73271a6265 Track enabled/disabled status. 2021-05-20 12:43:02 -05:00
Nolan Darilek
2433506c92 Add support for reporting cursor selection changes. 2021-05-20 12:43:01 -05:00
Nolan Darilek
97aa56f465 Add ValueChanged events, with initial support for text. 2021-05-20 12:43:01 -05:00
Nolan Darilek
8269cca95d Add support for click and double-click events. 2021-05-20 12:43:01 -05:00
Nolan Darilek
b3ced6106b Align widget descriptions more closely with common screen reader conventions.
Note that this work isn't complete--I'll correct more cases as I add more widgets and become familiar with their structures.
2021-05-20 12:43:01 -05:00
Nolan Darilek
50c8310de5 Remove a level of indirection, exposing the widget event on the top level. 2021-05-20 12:43:01 -05:00
Nolan Darilek
0fd88e52da Expose getter for currently focused widget. 2021-05-20 12:43:00 -05:00
Violeta Hernández
de02f7d042
Value of DragValue correctly clamped (#405)
* Update drag_value.rs

* `value` → `old_value`
2021-05-18 20:03:04 +02:00
Emil Ernerfeldt
dd4ac43b13 Make sure egui can handle zero-sized screen rect
This would previously hit a debug assert

Fixes https://github.com/emilk/egui/issues/395
2021-05-17 22:53:52 +02:00
Emil Ernerfeldt
6e5b52e3bc Add features extra_asserts and extra_debug_asserts for more asserts
This replaces all debug_asserts with these opt-in asserts

Related: https://github.com/emilk/egui/issues/395
2021-05-17 22:38:39 +02:00
Emil Ernerfeldt
bd5a85808a egui_demo_lib: fix persistence feature flag 2021-05-17 22:37:36 +02:00
Sven Niederberger
bfabb70cba
Fix BottomUp layout (#386) 2021-05-15 09:37:33 +02:00
Emil Ernerfeldt
2f46c975a5 Fix wrong vertical align in default layout
Only seen when having unusually high buttons
2021-05-13 23:15:44 +02:00
Emil Ernerfeldt
442b953964 Tell docs.rs to use the --all-features flag when generating docs
Closes https://github.com/emilk/egui/issues/381
2021-05-12 20:02:25 +02:00
Emil Ernerfeldt
9c475204da Fix uneven text kerning for non-integral dpi scales
Closes https://github.com/emilk/egui/issues/382
2021-05-12 19:41:45 +02:00
Emil Ernerfeldt
50a2ed0a14 Update wasm-bindgen to 0.2.74 2021-05-12 19:40:15 +02:00
ilya sheprut
9dd23b44e0
readme: add nannou_egui (#379) 2021-05-12 13:29:37 +02:00
Emil Ernerfeldt
934bb7f5e9 egui_web: fix double-paste bug 2021-05-11 19:25:31 +02:00
Emil Ernerfeldt
7b0f991b20 Improve docs concerning custom fonts, themes and accessibility
Closes https://github.com/emilk/egui/pull/370
Closes https://github.com/emilk/egui/issues/372
2021-05-11 14:56:27 +02:00
Emil Ernerfeldt
8f8ba16696 Release 0.12.0 - Multitouch, user memory, window pivots, and improved plots 2021-05-10 18:27:39 +02:00
Emil Ernerfeldt
3e8723c8ac Publish new web demo 2021-05-10 18:16:50 +02:00
Emil Ernerfeldt
1423bac3aa Smooth fading of plot grid and tick labels 2021-05-10 18:13:22 +02:00
Emil Ernerfeldt
cf3d12669c Fix misc typos
Closes https://github.com/emilk/egui/pull/366
Closes https://github.com/emilk/egui/pull/365
2021-05-10 10:52:49 +02:00
Emil Ernerfeldt
7747a1f171 Update tts 0.15 -> 0.16 2021-05-09 14:42:14 +02:00
Emil Ernerfeldt
c476ddb57c cargo update 2021-05-09 14:37:56 +02:00
Emil Ernerfeldt
b1559963bf Enable a bunch more clippy lints 2021-05-09 14:13:09 +02:00
Emil Ernerfeldt
4022b84ae7 group rustdoc lints under rustdoc:: prefix 2021-05-09 14:01:57 +02:00
Emil Ernerfeldt
fb5176c133 #![allow(clippy::float_cmp)] everywhere
it has always been an annoyance, never a help
2021-05-09 14:00:53 +02:00
Emil Ernerfeldt
6ad6f56cb1 Move shell scripts into sh/ subfolder 2021-05-09 13:28:24 +02:00
Emil Ernerfeldt
38186fe23e Add a TODO 2021-05-09 13:20:27 +02:00
Emil Ernerfeldt
5a21bc78a6 minor code simplification 2021-05-09 13:19:09 +02:00
Emil Ernerfeldt
a8c3deaf08 Rename ui.wrap to ui.scope 2021-05-09 13:17:32 +02:00
Emil Ernerfeldt
9dc092b778 Clean up demos 2021-05-09 13:07:56 +02:00
Emil Ernerfeldt
aa3c40c49f bug fix: don't lock focus by default 2021-05-09 11:17:32 +02:00
Emil Ernerfeldt
0b52813f62 Sort demo windows (multi-touch demo was out of order) 2021-05-09 10:09:05 +02:00
Emil Ernerfeldt
4bb79a7047 Move normalize_angle to emath 2021-05-08 23:42:17 +02:00
Emil Ernerfeldt
dd6980bacb Implement non-proportional multitouch pinch zooming 2021-05-08 23:31:31 +02:00
Emil Ernerfeldt
04d9ce227b Tidy up multitouch code: remove double spaces after full stop
Weirdest thing I've seen in my life.
2021-05-08 22:49:40 +02:00
Emil Ernerfeldt
268ddca161 demo_app: Remove screen_reader from default features
closes https://github.com/emilk/egui/issues/338
2021-05-08 16:27:41 +02:00
follower
a5e41f275c
Typo: CollpasingHeaders -> CollapsingHeaders (#359) 2021-05-08 16:24:22 +02:00
Emil Ernerfeldt
a7a36bd313 eframe: add always_on_top option (native) 2021-05-08 10:19:47 +02:00
Emil Ernerfeldt
7374ed9d00 epi/eframe: move options out of trait App into new NativeOptions 2021-05-08 10:14:56 +02:00
Emil Ernerfeldt
5e46bd404c Some documentation improvements 2021-05-08 09:25:52 +02:00