* 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
* 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
* 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
* squash before rebase
* Update AccessKit, introducing support for editable spinners on Windows and an important fix for navigation order on macOS
* Restore support for increment and decrement actions in DragValue
* Avoid VoiceOver race condition bug
* fix clippy lint
* Tell AccessKit that the default action for a text edit (equivalent to a click) is to set the focus. This matters to some platform adapters.
* Refactor InputState functions for AccessKit actions
* Support the AccessKit SetValue for DragValue; this is the only way for a Windows AT to programmatically adjust the value
* Same for Slider
* Properly associate the slider label with both the slider and the drag value
* Lazily activate egui's AccessKit support
* fix clippy lint
* Update AccessKit
* More documentation, particularly around lazy activation
* Tweak one of the doc comments
* See if I can get AccessKit exempted from the 'missing backticks' lint
* Make PlatformOutput::accesskit_update an Option
* Refactor lazy activation
* Refactor node mutation (again)
* Eliminate the need for an explicit is_accesskit_active method, at least for now
* Fix doc comment
* More refactoring of tree construction; don't depend on Arc::get_mut
* Override a clippy lint; I seem to have no other choice
* Final planned refactor: a more flexible approach to hierarchy
* Last AccessKit update for this PR; includes an important macOS DPI fix
* Move and document the optional accesskit dependency
* Fix comment typo
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* reformat
* More elegant code for conditionally creating a node
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* Set step to 1.0 for all integer sliders
* Add doc example for Response::labelled_by
* Clarify a TODO comment I left for myself
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* Nicer debug rectangles
* Move scrollbars into the clip-rect so they are always visible
* Improve table demo
* Add options for controlling inner and outer margin of the scroll bars
* Add line to changelog
* Update egui_extras changelog with recent Table improvements
* Refactor Table:s scroll options
* Add Table::auto_size
* Rename it auto_shrink
* 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>
* 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>
* 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
* 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
* eframe web: Add WebInfo::user_agent
* Deprecate `Modifier::ALT_SHIFT`
* Add code for formatting Modifiers and Key
* Add type KeyboardShortcut
* Code cleanup
* Add Context::os/set_os to query/set what OS egui believes it is on
* Add Fonts::has_glyph(s)
* Add helper function for formatting keyboard shortcuts
* Faster code
* Add way to set a shortcut text on menu buttons
* Cleanup
* format_keyboard_shortcut -> format_shortcut
* Add TODO about supporting more keyboard sumbols
* Modifiers::plus
* Use the new keyboard shortcuts in emark editor demo
* Explain why ALT+SHIFT is a bad modifier combo
* Fix doctest
* Add API for querying the size of a panel
* demo app: animate backend panel collapse
* Add helper function for animating panels
* More animation functions
* Add line to changelog
Closes https://github.com/emilk/egui/issues/2068
Before this PR, the default font, Ubuntu-Light, was ~11% smaller
than it should have been, and the default monospace font, Hack,
was ~14% smaller. This means that setting the font size `12` in egui
would yield smaller text than using that font size in any other app.
Ooops!
The change is that this PR now takes into account the ttf properties
`units_per_em` and `height_unscaled`.
If your egui application has specified you own font sizes or text styles
you will see the text in your application grow
larger, unless you go in and compensate by dividing all font sizes by
~1.21 for Ubuntu-Light/Proportional and ~1.16 for Hack/Monospace,
and with something else if you are using a custom font!
This effects any use of `FontId`, `RichText::size`, etc.
This PR changes the default `Style::text_styles` to compensate,
so the default egui style should look the same before and after this PR.
* Add `custom_parser` to `DragValue`
* Add `custom_parser` to `Slider`
* Add `binary_u64`, `octal_u64`, and `hexadecimal_u64` to `DragValue`
* Add `binary_u64`, `octal_u64`, and `hexadecimal_u64` to `Slider`
* Fix formatting and errors in docs
* Update CHANGELOG.md
* Fix CI errors
* Replace manual number parsing with i64::from_str_radix. Add support for signed integers.
* Update CHANGELOG.md
* Change documentation.
* Fix documentation.
* Fix documentation.
* Remove unnecessary links.
* Better estimate the plot bounds for generator functions
Avoid infinities, and sample more densely
* Optimize and improve plot auto-bounds logic
* Fix cropping out of the top/bottom of plots during auto-bounds