Before a disabled and enabled button would leave the parent ui
in different states, which lead to a bug where a slider drag could be
aborted if it caused a button before it to switch between enabled
and disabled.
Repro: dragging slider in "Manual Layout Test"
* Added plot items:
* Arrows, also called "Quiver plots" in matplotlib etc.
* Convex polygons
* Text
* Images
Other changes:
* Make HLine/VLine into PlotItems as well.
* Add a "fill" property to Line so that we can fill/shade the area between a line and a horizontal reference line.
* Add stems to Points, which are lines between the points and a horizontal reference line.
* Allow using .. when specifying ranges for values generated by explicit callback functions, as an alias for f64::NEG_INFINITY..f64::INFINITY
* Allow using ranges with exclusive end bounds for values generated by parametric callback functions to generate values where the first and last value are not the same.
* update changelog
* add legend background
* Use old 1.51 toolchain instead of bleeding edge
1.52 and 1.53 has problems with incremental compilation,
so some people chose to stay on 1.51 for now.
So let's make sure egui supports 1.51 for a while!
* Update to cint 0.2.2 to get rust 1.51.0 compatability
* Expanded `TextBuffer` interface to allow borrowed values.
* Removed superfluous `PartialEq` requirement on `TextBuffer`.
* Removed `std::fmt::Display` requirement for `TextBuffer`.
Now uses the `AsRef<str>` impl to format it where applicable.
Co-authored-by: Filipe Rodrigues <filipejacintorodrigues1@gmail.com>
- This issue was made apparent on macOS since 67c6002578
- Repro:
1. Cmd+Tab away from the window (this will keep the Cmd modifier state `true` until it is pressed again)
2. Cmd+Tab back to the window
3. Try to scroll with the trackpad or mouse wheel ... it won't work until you press and release the Cmd key!
4. Also the plot widget will be stuck in "zoom mode" while the Cmd modifier state is true.
- I was not able to reproduce the issue with `egui_web`
* Tweak style
More compact, less round, less noisy
* Button text is now same size as body text
* The rounder corners are now less rounded
* Collapsing headers no longer have a frame around them
* Combo-boxes looks better when opened
* Slightly more muted colors
* Remove extra line spacing after `\n` (i.e. between paragraphs)
* Thinner scrollbars
* Tweak light mode
* Tweak shadows
* Fix broken doc link
* Add style tweak to CHANGELOG
* Expose getter for currently focused widget.
* Remove a level of indirection, exposing the widget event on the top level.
* 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.
* Add support for click and double-click events.
* Add `ValueChanged` events, with initial support for text.
* Add support for reporting cursor selection changes.
* Track enabled/disabled status.
* Move `prev_text` off of the widget struct.
* Get rid of `has_widget_info` and push events directly where it makes sense.
* Fix typo.
* s/text_value/current_text_value/
* Use a `RangeInclusive` for text selection.
* Invert parameters.
* Various fixes.
* Only dispatch `SelectionChanged` if the selection actually changes.
* Fix missing focus events.
* If values for `current_text` and `prev_text` are unchanged, filter out the previous value.
* No need to pass in `&mut prev_text` everywhere
* Appease Clippy.
* Mask password fields in generated events.
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* Make sure the scroll bar is never outside the screen rectangle
This is an alternative attempt to fix the bug mentioned in
https://github.com/emilk/egui/pull/392
egui expects that the container can always be made wider,
which is true for all egui Ui:s, but not true for the outer
frame/chrome that egui ultimately needs to sit within.
* Clamp scroll to screen rect rather than available rect
* Fix scrollbar spacing when shrinking too small
* Update changelog
* initial work on markers
* clippy fix
* simplify marker
* use option for color
* prepare for more demo plots
* more improvements for markers
* some small adjustments
* better highlighting
* don't draw transparent lines
* use transparent color instead of option
* don't brighten curves when highlighting
* Initial changes to lengend:
* Font options
* Position options
* Internal cleanup
* draw legend on top of curves
* update changelog
* fix legend checkboxes
* simplify legend
* remove unnecessary derives
* remove config from legend entries
* avoid allocations and use line_segment
* compare against transparent color
* create new Points primitive
* fix doctest
* some cleanup and fix hover
* common interface for lines and points
* clippy fixes
* reduce visibilities
* update legend
* clippy fix
* change instances of "curve" to "item"
* change visibility
* Update egui/src/widgets/plot/mod.rs
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* Update egui/src/widgets/plot/mod.rs
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* Update egui_demo_lib/src/apps/demo/plot_demo.rs
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* Update egui_demo_lib/src/apps/demo/plot_demo.rs
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* changes based on review
* add legend to demo
* fix test
* move highlighted items to front
* dynamic plot size
* add legend again
* remove height
* clippy fix
* update changelog
* minor changes
* Update egui/src/widgets/plot/legend.rs
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* Update egui/src/widgets/plot/legend.rs
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* Update egui/src/widgets/plot/legend.rs
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* changes based on review
* add functions to mutate legend config
* use horizontal_align
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* initial work on markers
* clippy fix
* simplify marker
* use option for color
* prepare for more demo plots
* more improvements for markers
* some small adjustments
* better highlighting
* don't draw transparent lines
* use transparent color instead of option
* don't brighten curves when highlighting
* update changelog
* avoid allocations and use line_segment
* compare against transparent color
* create new Points primitive
* fix doctest
* some cleanup and fix hover
* common interface for lines and points
* clippy fixes
* reduce visibilities
* Update egui/src/widgets/plot/mod.rs
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* Update egui/src/widgets/plot/mod.rs
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* Update egui_demo_lib/src/apps/demo/plot_demo.rs
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* Update egui_demo_lib/src/apps/demo/plot_demo.rs
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* changes based on review
* fix test
* dynamic plot size
* remove height
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>