Commit graph

1844 commits

Author SHA1 Message Date
Emil Ernerfeldt
b8f427ddd6 Add a Code of Conduct, based on the Contributor Covenant
Taken verbatim (with an added mention of the egui Discord) from
https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
2022-02-21 15:30:53 +01:00
Emil Ernerfeldt
b360dffdbf Demo app: handle the case of wrong selected anchor 2022-02-21 15:29:18 +01:00
Emil Ernerfeldt
c3fc8997d6
Introduce egui_extras with RetainedImage for loading svg,png,jpeg,… (#1282) 2022-02-21 15:26:26 +01:00
Emil Ernerfeldt
713917e481 refactor egui_web (break up lib.rs) 2022-02-21 09:28:12 +01:00
Emil Ernerfeldt
89d19860b8 Misc code cleanup, docs fixes, etc 2022-02-19 20:58:28 +01:00
Emil Ernerfeldt
e49245fae5 Improve the anti-aliasing of filled paths with sharp corners
This comes at the cost of these corners sometimes becoming badly
extruded instead. The sharper the corner, the bigger the problem.

A proper fix will have to wait for later.

Part of https://github.com/emilk/egui/issues/1226
2022-02-19 20:46:44 +01:00
Emil Ernerfeldt
b8fbbf7d62 Fix anti-aliasing of filled paths with counter-clockwise winding order
Part of https://github.com/emilk/egui/issues/1226
2022-02-19 20:46:44 +01:00
Emil Ernerfeldt
10634fc344 Improve the Bézier demo: drag control points and simplify code
Follow-up to https://github.com/emilk/egui/pull/1178
2022-02-19 20:46:44 +01:00
Emil Ernerfeldt
3a5ec4733f Fix bug when debug-painting clip rectangles 2022-02-19 20:46:40 +01:00
Emil Ernerfeldt
aa53522179
Slider event fixes (#1270)
* Slider: return drag_started,dragged,drag_released if value was dragged

Closes https://github.com/emilk/egui/issues/1269

* Fix: DragValue correctly reports gained_focus

* Make `Slider` report gained_focus,has_focus,lost_focus from DragValue

Closes https://github.com/emilk/egui/issues/1268
2022-02-19 19:56:12 +01:00
Emil Ernerfeldt
3ed68274b0 Make Slider report gained_focus,has_focus,lost_focus from DragValue
Closes https://github.com/emilk/egui/issues/1268
2022-02-19 11:12:09 +01:00
Emil Ernerfeldt
0d21405855 Fix: DragValue correctly reports gained_focus 2022-02-19 11:05:02 +01:00
Emil Ernerfeldt
989a6d202f Slider: return drag_started,dragged,drag_released if value was dragged
Closes https://github.com/emilk/egui/issues/1269
2022-02-19 10:58:07 +01:00
Benedikt Terhechte
8e62b382fd
Add some macOS emacs keybindings (#1243)
Move cursor left: ^B
    Move cursor right: ^F
    Beginning of line: ^A
    End of line: ^E
    Line up: ^P
    Line down: ^N
2022-02-19 10:42:43 +01:00
Tulio Leao
e746e3a58b
Light edits on README.md (#1246) 2022-02-19 10:41:31 +01:00
Urho Laukkarinen
6abdde0334
Add more source code links to demos (#1260) 2022-02-17 17:08:13 +01:00
Emil Ernerfeldt
3d754e3a16
Prevent ScrollArea:s from becoming tiny (#1255)
Closes https://github.com/emilk/egui/issues/1097
2022-02-17 17:08:05 +01:00
Emil Ernerfeldt
b5c8f034e7
Add web location info to egui_web/epi (#1258)
This adds all parts of the web "location" (URL) to frame.info().web_info, included a HashMap of the query parameters, percent-decoded and ready to go.

This lets you easily pass key-value pairs to your eframe web app.
2022-02-17 16:46:43 +01:00
Emil Ernerfeldt
4e316d32e5 Fix scroll_to with align
Broke in https://github.com/emilk/egui/pull/1252
2022-02-17 16:45:42 +01:00
Emil Ernerfeldt
4af3cae26d
Scroll so that text cursor remains visible (#1252)
Closes https://github.com/emilk/egui/issues/165
2022-02-16 21:34:47 +01:00
cat-state
c1569ed0d7
Add Ui.input_mut & InputState.ignore_key (#1212) 2022-02-15 17:14:24 +01:00
Friz64
c8c871fcd1
Add move_to_top and top_most_layer (#1242) 2022-02-15 17:13:08 +01:00
Sven Niederberger
8f8eb5d4a9
Customize Plot label and cursor texts (#1235)
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2022-02-15 17:12:29 +01:00
BctfN0HUK7Yg
cfad28936d
Color picker now always pops up next to the button (#1237) 2022-02-15 16:55:43 +01:00
Juan Campa
635c65773d
Allow scroll into view without specifying an alignment (#1247)
* Allow scroll into view without specifying an alignment
* Handle case of UI being too big to fit in the scroll view
2022-02-15 16:52:29 +01:00
Emil Ernerfeldt
c1cd47e3a7 README: Add section to FAQ about how to work with async code 2022-02-13 23:04:08 +01:00
Emil Ernerfeldt
f92df7db56 README: Add screenshot to demonstrate the skin-ability of egui 2022-02-13 23:04:08 +01:00
Alexander
62504fface
Slider: Add step parameter (#1225)
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2022-02-13 21:55:51 +01:00
Juan Campa
c4528beb72
Make non interactable layers not interact (#1240)
* Make non interactable layers not interact
* Make menus interactable
* Fix area interactable not being updated each frame
2022-02-13 21:09:25 +01:00
4JX
14e985a894
Expose FontTweak through egui::FontTweak (#1244) 2022-02-13 10:10:39 +01:00
Emil Ernerfeldt
69626296f1
Make v-align and scale of user fonts tweakable (#1241)
* Add ability to "tweak" the scale and y-offsets of individual fonts
* Change default font tweak

This help vertically center large text.
2022-02-12 18:22:42 +01:00
Emil Ernerfeldt
3f8ba3a542
Improve the contrast of the default light mode style (#1238)
Makes backgrounds brighter and foregrounds darker.
2022-02-11 13:58:50 +01:00
Emil Ernerfeldt
815598a842 .vscode/settings.json: insertFinalNewline and trimTrailingWhitespace
For when people make PR:s touching .toml, .md files
2022-02-10 19:34:07 +01:00
Yusuf Bera Ertan
1ebb5ccabf
Don't install console panic hook and tracing wasm subscriber in egui_web (#1230)
Do so in egui_demo_app instead
2022-02-10 15:44:41 +01:00
4JX
2f042ababd
Make Margin pub and move to style.rs (#1236) 2022-02-10 15:26:57 +01:00
Emil Ernerfeldt
b2323bd13e Add VSCode settings with {"editor.formatOnSave": true}
Hopefully this will increase the number of PR:s with correct formatting.
2022-02-09 18:14:55 +01:00
Emil Ernerfeldt
4cede42748 Add ui.weak(text) 2022-02-09 15:08:01 +01:00
Emil Ernerfeldt
defc400c21
Add an example of how to display an SVG image in egui (#1228) 2022-02-09 08:12:12 +01:00
Erlend Walstad
2802e03526
Per-side margins with new struct Margin (#1219) 2022-02-07 11:29:16 +01:00
Emil Ernerfeldt
603ec82a5e
cargo deny: clarify MPL-2.0 license and use un-patched ureq again (#1222)
See https://github.com/algesten/ureq/issues/478#issuecomment-1031029647
2022-02-07 10:38:08 +01:00
4JX
c9098288f5
Fix a typo: tolerence -> tolerance (#1214) 2022-02-06 16:30:34 +01:00
Emil Ernerfeldt
5459ab29b7 Fix: allow calling set_pixels_per_point before first frame
Closes https://github.com/emilk/egui/issues/1153
2022-02-06 00:16:59 +01:00
Emil Ernerfeldt
55067f54ce Demo app fix: respect native pixels_per_point on startup 2022-02-05 23:54:44 +01:00
Emil Ernerfeldt
cbc53fbe2e eframe: Add epi::NativeOptions::initial_window_pos 2022-02-05 19:12:03 +01:00
Manuel Innerhofer
7d41551913
Fixed typos: wether -> whether (#1210)
Co-authored-by: mir <mir@wisdomtag.com>
2022-02-05 18:14:16 +01:00
Emil Ernerfeldt
9ed96155e9 Rename corner_radius to rounding
Also update changelogs and clean up other aspects of
https://github.com/emilk/egui/pull/1206
2022-02-05 18:13:46 +01:00
Emil Ernerfeldt
ace2ac00da Update to tts 0.20.2 which resolves copy-left license issue
See https://github.com/ndarilek/tts-rs/pull/21
2022-02-05 17:53:37 +01:00
4JX
7e7b9e1919
Per-corner rounding of rectangles (#1206)
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2022-02-05 17:48:55 +01:00
Emil Ernerfeldt
0fa4bb9c64 Clean up all Cargo.toml: put features higher, and document them better 2022-02-05 11:11:15 +01:00
Juan Campa
32a9b4abcc
Add on_hover_text_at_pointer (#1179) 2022-02-05 10:51:16 +01:00