- 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>
* Initial design for `TextBuffer` trait, to allow `TextEdit` to edit types other than `String`.
* Moved `insert_text` implementation into `TextBuffer`.
This allows the user to implement text inserting depedent on their type instead of using a `String` and converting back to `S`, which may be a lossless convertion.
* Moved part of `delete_selected_ccursor_range` implementation into `TextBuffer::delete_range`.
* `TextBuffer::insert_text` not returns how many characters were inserted into the buffer.
This allows implementations to "saturate" the buffer, only allowing for a limited length of characters to be inserted.
* Now using `byte_index_from_char_index` instead of custom implementation.
* `decrease_identation` impl now modified the string in-place.
Removed `From<String>` bound for `TextBuffer`.
* Added changes to changelog.
* Moved updated changelog to .
* Updated documentation on `TextBuffer`.
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* Renamed `TextBuffer::delete_text_range` to `delete_char_range`.
Co-authored-by: Filipe Rodrigues <filipejacintorodrigues1@gmail.com>
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* implement cint for color types under feature flag
* upgrade to cint 0.2, remove from default features
* upgrade to cint 0.2.1, add a couple more from/into implementations
* changelog entry
* fix typo in changelog
* sort dependency
* fmt