1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 05:10:03 -04:00
Commit Graph

51 Commits

Author SHA1 Message Date
Emil Ernerfeldt
3f02c7d698 Add Rangef to emath 2023-05-04 12:27:13 +02:00
Emil Ernerfeldt
065801410a Resize grid 2023-05-04 11:14:30 +02:00
Emil Ernerfeldt
e9b446b577 Refactor: register grid drop-zones during the ui pass 2023-05-04 10:57:46 +02:00
Emil Ernerfeldt
f5301b1761 Fix typos 2023-05-04 10:04:14 +02:00
Emil Ernerfeldt
e2b1438977 Improve dragging around tab labels 2023-05-04 09:40:40 +02:00
Emil Ernerfeldt
8267cf5f57 Drag-and-drop for vertical layouts 2023-05-03 22:48:26 +02:00
Emil Ernerfeldt
5fc6bfbf49 Resize vertical layouts 2023-05-03 16:36:19 +02:00
Emil Ernerfeldt
46e4fb49ec Simplify shares and use Rect/interacto for resize 2023-05-03 00:33:30 +02:00
Emil Ernerfeldt
4f4261f173 Resizing of horizontal layouts 2023-05-02 19:30:59 +02:00
Emil Ernerfeldt
f8ce589fd5 Only lay out the active tab 2023-05-02 18:11:33 +02:00
Emil Ernerfeldt
fa69d7a22b Split into files 2023-04-26 20:44:27 +02:00
Emil Ernerfeldt
e9928c8766 Turn Branch into an enum 2023-04-26 20:31:37 +02:00
Emil Ernerfeldt
53ce1904a2 Code cleanup: move branch-gnostic code into branch.rs 2023-04-26 20:01:36 +02:00
Emil Ernerfeldt
9510d3418e Some bugfixes 2023-04-25 23:23:18 +02:00
Emil Ernerfeldt
6563522939 Better re-ordering of grid cells 2023-04-25 21:51:49 +02:00
Emil Ernerfeldt
7b26f3b79f Grid support 2023-04-25 21:27:26 +02:00
Emil Ernerfeldt
e714b33940 Change layout at runtime 2023-04-25 16:26:53 +02:00
Emil Ernerfeldt
ea47d36de7 Refactor: use a single struct Branch 2023-04-25 13:19:24 +02:00
Emil Ernerfeldt
4be5f43a3a Remove NodeState 2023-04-25 12:42:29 +02:00
Emil Ernerfeldt
a4dc86d77e Store rects separatedly 2023-04-25 12:39:18 +02:00
Emil Ernerfeldt
1d0509de23 Smooth preview 2023-04-25 12:25:17 +02:00
Emil Ernerfeldt
32be36416c You can mandate that all leaves have tabs 2023-04-24 22:37:04 +02:00
Emil Ernerfeldt
0617b7d26d Drag to re-arrange horizontal layout 2023-04-24 21:41:19 +02:00
Emil Ernerfeldt
240989df8b Drag to re-arrange tabs 2023-04-24 20:46:21 +02:00
Emil Ernerfeldt
13ec65cf08 Fix drag-drop and simplification code 2023-04-24 17:04:10 +02:00
Emil Ernerfeldt
ce7ed11542 bug fixes 2023-04-24 15:44:27 +02:00
Emil Ernerfeldt
b5eddc5d5c Buggy drop-detection 2023-04-24 15:44:27 +02:00
Emil Ernerfeldt
9b154c6d1d Preview drag destinations 2023-04-24 15:44:27 +02:00
Emil Ernerfeldt
92d93cb24a Drag tab names 2023-04-24 15:44:27 +02:00
Emil Ernerfeldt
52657301c9 dock wip 2023-04-24 15:44:27 +02:00
Emil Ernerfeldt
9c9a54ce36 Replace tracing with log (#2928)
* Replace tracing crate with log

It's just so much simpler to use

* Add `bacon wasm` job

* eframe: add a WebLogger for piping log events to the web console
2023-04-18 21:11:26 +02:00
Jozef Číž
33aa4d698f Fix typos (#2866)
* Fix typos in comments

* Fix typos in demo texts

* Fix typos in code names

* Fix typos in cargos

* Fix typos in changelogs
2023-04-18 15:52:45 +02:00
Barugon
b80c0e6ff6 Add option to show icon (#2910) 2023-04-18 14:55:09 +02:00
YgorSouza
8ec9233e28 Add #![forbid(unsafe_code)] where unsafe isn't needed (#2773)
To be consistent with the use of the safety badge in the README.
2023-03-29 14:39:51 +02:00
Emil Ernerfeldt
06d753c289 Update SVG crates (#2670)
* Update resvg, tiny-skia and usv to latest

* Remove default features from svg crates

Users can always opt-in to them themselves

* Update png 0.17.6 -> 0.17.7
2023-02-04 13:00:04 +01:00
Emil Ernerfeldt
8ce0e1c520 Avoid deadlocks by using lambdas for context lock (#2625)
ctx.input().key_pressed(Key::A) -> ctx.input(|i| i.key_pressed(Key::A))
2023-01-25 10:24:23 +01:00
Emil Ernerfeldt
4bd4eca2e4 Add ability to hide button backgrounds (#2621)
* Add Spacing::combo_width

* Put ComboBox arrow closer to the text

* Tweak faint_bg_color

* Make it possible to have buttons without background

…while still having background for sliders, checkboxes, etc

* Rename mandatory_bg_fill -> bg_fill

* tweak grid stripe color (again)

* Make the animated part of the ProgressBar more visible

* Add line in changelog

* Add another line in changelog

* Menu fix: use the `open` widget style for open menus

* Adjust sizes on menu buttons and regular buttons to make sure they match

* Update comment

Co-authored-by: Andreas Reich <andreas@rerun.io>

* optional_bg_fill -> weak_bg_fill

Co-authored-by: Andreas Reich <andreas@rerun.io>
2023-01-24 10:11:05 +01:00
Kornel
e70204d726 Point to caller's location when using log_or_panic (#2552) 2023-01-07 20:27:19 +01:00
Emil Ernerfeldt
126be51ac3 Add Visuals::striped as global default for Grids and Tables 2022-12-13 21:02:39 +01:00
Emil Ernerfeldt
da0a178701 Style tweaks (#2406)
* 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
2022-12-08 10:55:13 +01:00
René Rössler
c3932f7f7f Chrono update (#2397)
* limit day to last day of month if the month or year is changed

* update chrono to 0.4.23, switch to NaiveDate and remove use of deprecated functions.
2022-12-06 11:42:53 +01:00
Emil Ernerfeldt
7133818c59 Make sure scroll bars are always visible (#2371)
* 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
2022-11-30 22:58:00 +01:00
Emil Ernerfeldt
2dc2a5540d egui_extras::Table improvements (#2369)
* 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
2022-11-30 19:56:06 +01:00
Emil Ernerfeldt
eca5e6a4d2 Update to Rust 1.65 (#2314)
* Update to Rust 1.65

Because then you can use dynamic linking on Linux

* Fix a bunch of clippy lints

* Update changelogs

* More clippy fixes
2022-11-16 19:08:03 +01:00
blusk
3805a3282f feat: add a way to provide customable scaling to SVG rasterization (#2252) 2022-11-07 16:52:14 +01:00
Emil Ernerfeldt
34e6e12f00 Specify deifferent minification and magnification filters (#2224)
* Specify deifferent minification and magnification filters

* Fixes

* Update changelogs

* Doctest fixes

* Add deprecation notice for RetainedImage::with_texture_filter
2022-11-02 17:54:06 +01:00
ItsEthra
76d0cf5034 Fixed datepicker not being marked as changed (#2208) 2022-10-31 21:40:49 +01:00
Clement Rey
3d36a20376 table: fix deadlocks caused by lock fairness (#2156) 2022-10-16 20:10:48 +02:00
njust
dbfaa4527b egui_extras: Add Table::vertical_scroll_offset (#1946)
* egui_extras: Add Table::vertical_scroll_offset

* Added example for TableBuilder::vertical_scroll_offset

* Format code

* Add link to PR in the changelog

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2022-08-28 09:37:23 +02:00
Emil Ernerfeldt
8737933101 Improve documentation and logging 2022-08-20 15:06:43 +02:00