* Fix key press event
* Add example with key presses
* Changelog line for key_press fix
* PR review improvements
* Add PR link in changelog
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* Use simple `ui.interact` for the resize line
* Introduce TableReizeState
* Simplify some code
* Add striped options to table demo
* Auto-size table columns by double-clicking the resize line
* Table: add option to auto-size the columns
* Table: don't let column width gets too small, unless clipping is on
* egui_extras: always use serde
Otherwise using `get_persisted` etc is impossible,
and working around that tedious.
* Avoid clipping last column in a resizable table
* Some better naming
* Table: Use new `Column` for setting column sizes and properties
Also make `clip` a per-column property
* All Table:s store state for auto-sizing purposes
* Customize each column wether or not it is resizable
* fix some auto-sizing bugs
* Fix shrinkage of adaptive column content
* Rename `scroll` to `vscroll` for clarity
* Add Table::scroll_to_row
* scroll_to_row takes alignment
* Fix bug in table sizing
* Strip: turn clipping OFF by default, because it is dangerous and sucks
* Add TableBody::mac_rect helper
* Table: add options to control the scroll area height.
* Docstring fixes
* Cleanup
* Enable incrementing and decrementing `DragValue` with the keyboard
* As soon as a DragValue is focused, render it in edit mode
* Simpler, more reliable approach to managing the drag value's edit string
* Add changelog entry
* Update doc comment
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* Add comment explaining why we don't listen for left/right arrow
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* Add depth stencil initialization to `Painter`
* Move depth stencil initialization into `resize_and_generate_depth_texture_view`, and call it in `set_window` and `on_window_resized`
* Allow for depth texture in WASM builds
* change `map` to `if let` statement
* use reference for render state
* Clean up descriptors and move texture generation to on resize events
* remove unused field from WebOptions
* feat(combobox): implement text wrap for selected text
* chore(changelog): add line to changelog
* feat(combobox-text-wrap): make wrap boolean
- specifying a wrap width didn't really make sense so now it's boolean
- the selected text will now use the maximum available width while still
respecting the spacing and icon coming after it
* feat(combobox-text-wrap): update changelog
* Paint ComboBox icon differently if opening upwards
* Add Area::pivot and Window::pivot
* Add Window::contrain
* ComboBox: pop up above if it doesn't fit below
* Add line to changelog
* Don't show window until after initialization
Shortens #1802, but does not completely solve it
* format code
* Present first frame immediately before showing window
This resolves the white flash almost completely, but is a hack. Window
visibility should be derived from the AppOutput, and the first frame
should not be painted before the event loop has processed initial
events.
Working on a better implementation.
* Integrate window showing with AppOutput
This allows an app to keep the window hidden (never shown) by calling
Frame.set_visible(false) on the first update. This includes a slightly
less nasty hack than the last commit did.
Also fixes an accidental cross-contamination of pull requests.
* fmt
* add comments
* add comments
* add comments
* add comments
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* eframe: Repaint immediately on RepaintAsap, fixes#903
This completely eliminates the white flickering seen on Windows when
rapidly resizing a window on the glow backend. The reason that happens
is because DWM only waits for the resize event to be delivered before
displaying the window at its new size. You must repaint synchronously
inside that iteration of the event loop or else you get flickering.
* Differentiate between RepaintAsap and RepaintNext
RepaintNext looks like it is indeed needed in at least one case instead
of RepaintAsap.
* Use RepaintNext in more situations
Starting to understand why this was the behavior. It looks like only a
few special cases should be given RepaintAsap, such as the window being
resized. All other cases should be RepaintNext, as it can wait.
Using RepaintAsap in all situations will cause things like lag when
changing a slider by keyboard with a high key repeat rate.
* Add explanatory comments
I am a total hypocrite for forgetting to add these.
* Rename RepaintAsap to RepaintNow
There is no notion of "possibility" here like there is when waiting for
RedrawEventsCleared. RepaintNow causes an immediate repaint no matter
what.
* Fix RepaintNow comment
"Delays" is ambiguous.
* Fixed color edit popup going outside the screen
* Added option to constrain areas
* Constrain color picker area
* Constrain popups
* Updated changelog
* Only show tooltips when mouse pointer is still
Revert to the old behavior by setting
`style.interaction.show_tooltips_only_when_still = false`.
* Area: take `impl Into<Id>`
* refactor tooltips
* Fix was_tooltip_open_last_frame
* Bug fix
* Add some spacing between tooltips
* Turn off optimization for debug builds again
* Optimize rect_contains_pointer
* Fix for colorpicker: make popup immovable
* Area: interact first
* ScrollArea: do interaction first
* Window: shrink double-clickable area of titelbar
* Only the top-most (latest added) interactive widget gets `hovered=true`
* Add Frame::total_margin
* Update changelog
* Add debug-options to visualize what widgets cover which other widget
* Using tracing-subscriber in hello_world example
* Add Key::Plus/Minus/Equals
* Warn if failing to guess OS from User-Agent
* Remove jitter when using Context::set_pixels_per_point
* Demo app: zoom in/out using ⌘+ and ⌘-
* Demo app: make backend panel GUI scale slider better
* Optimize debug builds a bit
* typo
* Update changelog
* Add helper module `egui::gui_zoom` for zooming an app
* Better names, and update changelog
* Combine Plus and Equals keys
* Last fix
* Fix docs