Commit Graph
280 Commits
Author SHA1 Message Date
Emil Ernerfeldt da96fcacd3 Improve panel sizing API 2022-10-28 10:16:02 +02:00
Lily M. Lyons 1fadc7396a Add CollapsingHeader::show_unindented (#2154) 2022-10-24 17:10:13 +02:00
Emil Ernerfeldt aebec6329a Use ⚠ instead of ‼ in "Debug build" warning
The latter is not supported by the default fonts
2022-10-24 15:00:50 +02:00
Andrew Langmeier a1f6f68213 Allow for changing of plot bounds from PlotUI (#2145) 2022-10-13 08:00:11 +02:00
Nicolas Musset ae5294e63c Use WidgetText for the slider's text (#2143) 2022-10-12 17:20:32 +02:00
Emil Ernerfeldt 7803285221 Remove Debug trait constraint on Id sources 2022-10-10 22:34:08 +02:00
Emil Ernerfeldt f4d2aa5b4a Only call the request_repaint_callback at most once per frame (#2126)
egui-winit adds new repaint events to the event loop on each call, and on some platforms this becomes very expensive.
2022-10-10 10:47:20 +02:00
Andrew LangmeierandEmil Ernerfeldt 0fe0c8115c Add ability to control double click reset in plot widget (#2115)
* Add ability to control double click reset in plot widget

* improve docstring

* small optimization

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2022-10-10 09:57:25 +02:00
Emil Ernerfeldt 3ec170cc1e Tweak warning color in bright mode 2022-10-06 11:49:12 +02:00
Emil Ernerfeldt 4dd5ffa254 Fix: make ScrollAreaOutput public 2022-10-06 09:03:18 +02:00
Emil Ernerfeldt dd67f3631f Add Painter::image convenience function 2022-10-03 10:26:19 +02:00
Tobias Schmitz 981fdb3932 fix: default to changing y axis when changing data aspect (#2087) 2022-10-02 14:32:37 +02:00
Paul Rouget aa1536f1a7 Make Layout properties public (#2096) 2022-10-02 08:51:29 +02:00
Zoxc 53ff83737b Plot: Add auto_bounds_x, auto_bounds_y and reset (#2029)
* Make double click reset to the initial view

* Allow forcing auto bounds

* Allow plots to be reset

* Rename `modified` to `bounds_modified`
2022-10-02 08:44:59 +02:00
Caleb Leinz (he/him) 5e91a3033d Added ability to set color of spinner (#2088) 2022-10-01 15:18:44 +02:00
Paul Rouget 2dca01ecd5 Bug Fix: Allocate Frame outer margins (#2089) 2022-10-01 14:18:15 +02:00
Emil Ernerfeldt 29fa63317e Fix text sizes being too small (#2069)
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.
2022-09-21 21:31:08 +02:00
setzer22andEmil Ernerfeldt 4aae638e15 Change several methods from pub(crate) to pub (#2051)
* Change several methods from pub(crate) to pub

* document next_auto_id

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2022-09-21 20:08:26 +02:00
Chris Hamons 311eb66cae Add spacing.menu_margin for customizing menu spacing (#2036)
- Fixes https://github.com/emilk/egui/discussions/287
2022-09-17 11:29:19 +02:00
Sheldon Nico 0605bcfca7 Add IME support for native (#2046) 2022-09-15 17:21:43 +02:00
Zoxc 2842d390c9 Allow box zoom in any direction (#2028) 2022-09-09 08:30:14 +02:00
Emil Ernerfeldt 1d5f20b46c Improve docstrings
Closes https://github.com/emilk/egui/issues/2001
2022-09-05 12:05:29 +02:00
njustandEmil Ernerfeldt 124ed5e4ba Fixed typo (#1990)
* Fixed typo

* fix grammar too

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2022-09-05 12:02:31 +02:00
Adam Gąsior 9b2c3d1026 Add custom parser to DragValue and Slider, with additional support for binary, octal, and hexadecimal numbers. (#1967)
* 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.
2022-08-28 18:16:12 +02:00
MaximOsipenko af63101fdc eliminate some possible deadlocks (#1968) 2022-08-28 09:36:23 +02:00
Zoxc 9be060fe69 Allow cursors to be linked for plots (#1722)
* Allow cursors to be linked

* Link cursors in demo

* Refactor cursor memory to deal with removal of plots

* Refactor PlotItem::on_hover to produce a list of cursors

* Use a separate `LinkedCursorsGroup` type to link cursors.

* Refactor `Cursor`.

* Inline `push_argument_ruler` and `push_value_ruler`.

* Update documentation

* Update doc reference
2022-08-28 09:36:08 +02:00
Emil Ernerfeldt 97ce103209 Release 0.19.0 - wgpu backend, repaint_after, continue-after-close 2022-08-20 16:49:58 +02:00
Emil Ernerfeldt 2453756782 Fix broken GitHub source links due to #1940 2022-08-20 15:18:02 +02:00
Emil Ernerfeldt 8737933101 Improve documentation and logging 2022-08-20 15:06:43 +02:00
Emil Ernerfeldt 041f2e64ba Move all crates into a crates directory (#1940) 2022-08-20 10:41:49 +02:00