Commit graph

624 commits

Author SHA1 Message Date
Emil Ernerfeldt
938c847c6e [math] bug fix: allow inverted range in remap_clamp 2020-09-06 07:04:47 +02:00
Emil Ernerfeldt
c26b3069e0 Fix a clippy nit 2020-09-06 06:58:40 +02:00
Markus Webel
6b30e21f4e
Kinetic scrolling (#20)
* Fixed typo in function description

* Added vertical kinetic scrolling

* Checked off kinetic scrolling from TODO

Co-authored-by: Markus Webel <m@rkus.online>
2020-09-06 06:57:29 +02:00
Emil Ernerfeldt
6ca11aff8c [refactor] use "fg_" prefix in WidgetStyle 2020-09-05 13:30:04 +02:00
Emil Ernerfeldt
8b93135fe4 [style] you can override the default body text style 2020-09-04 10:15:35 +02:00
Emil Ernerfeldt
2c96cbfa9c [dependencies] turn off optional ahash features to reduce dependencies 2020-09-03 23:04:19 +02:00
Emil Ernerfeldt
dc40a5d31d [refactor] represent colors with arrays 2020-09-02 22:04:10 +02:00
Emil Ernerfeldt
9823e4d63c [refactor] Add Triangles::colored_vertex helper 2020-09-02 21:52:43 +02:00
Emil Ernerfeldt
e8713bbb71 [widgets] DragValue can now be used with some integers 2020-09-02 06:05:48 +02:00
Emil Ernerfeldt
ecd68f4faa [refactor] combine stroke_color and stroke_width in WidgetStyle 2020-09-02 01:36:52 +02:00
Emil Ernerfeldt
9d4021d703 [refactor] rename LineStyle to Stroke 2020-09-01 23:54:21 +02:00
Emil Ernerfeldt
e7b098ac56 [style] make the default style a lot more compact and sleek 2020-09-01 20:40:54 +02:00
Emil Ernerfeldt
2129a87575 [tesselator] handle paths with duplicated points better 2020-09-01 20:29:00 +02:00
Emil Ernerfeldt
62b1a2658f [tesselator] hide Path from view and improve thin rounded rectangles 2020-09-01 20:03:50 +02:00
Emil Ernerfeldt
96153a86e5 [refactor] Remove Option wrappers around colors and line styles
Just use transparency instead of None
2020-08-31 22:56:24 +02:00
Emil Ernerfeldt
413ed6999e [refactor] break up Style into Spacing, Interaction and Visuals
Also make sliders fixed-width
2020-08-31 22:27:31 +02:00
Emil Ernerfeldt
fe50f39590 [demo] toggle_switch.rs source demo for how to create your own widget 2020-08-31 07:55:31 +02:00
Emil Ernerfeldt
c0876eff90 [refactor] better names for widget style members 2020-08-31 07:55:28 +02:00
Emil Ernerfeldt
24003b17a3 [animation] add Context::animate_bool helper function 2020-08-30 10:26:16 +02:00
Emil Ernerfeldt
c23dfd155c [refactor] unify InteractInfo and GuiResponse to Response 2020-08-30 08:52:42 +02:00
Emil Ernerfeldt
843074eb7d cargo update 2020-08-30 08:22:35 +02:00
Emil Ernerfeldt
a395b385b7 build new web demo 2020-08-29 18:18:48 +02:00
Emil Ernerfeldt
3160c44a4b Move TODO-list to own TODO.md 2020-08-29 18:16:43 +02:00
Emil Ernerfeldt
8f1def11f1 [slider] remove ": " for sliders without text. still show value 2020-08-29 18:00:27 +02:00
Emil Ernerfeldt
f7122abc5d [slider] fix vertical alignment of text 2020-08-29 17:58:25 +02:00
Emil Ernerfeldt
1d350ad15b [painter] add helper functions for drawing lines, circles and rectangles 2020-08-29 17:30:06 +02:00
Emil Ernerfeldt
c27e53a7b2 [color] Rename Color to Srgba + sRGBA correct fading of thin lines
Also remove the extra large `aa_size` hack,
so everything now looks slightly crispier.

I also took the opportunity to tweak some colors.
2020-08-29 16:58:59 +02:00
Emil Ernerfeldt
2465e689fb [demo] additional window resize demo with embedded scroll 2020-08-29 15:32:17 +02:00
Emil Ernerfeldt
1a9618c524 spelling 2020-08-29 15:31:06 +02:00
Emil Ernerfeldt
3a3eb5ef5d Fix minor bug in mouse velocity tracking 2020-08-29 15:16:51 +02:00
Emil Ernerfeldt
f1989c39c6 input: keep using the latest known pixels_per_point 2020-08-29 15:15:50 +02:00
Emil Ernerfeldt
3d3b93da8b Force user to explicitly select a max height for a ScrollArea 2020-08-29 15:14:44 +02:00
Emil Ernerfeldt
5df9bfd514 Add ui.drag_angle helper 2020-08-29 15:10:59 +02:00
Emil Ernerfeldt
d4c0197752 add ui.horizontal_centered helper 2020-08-29 15:10:59 +02:00
Emil Ernerfeldt
7b75bd2d09 Use consistent order of width/color arguments for line style 2020-08-29 14:45:20 +02:00
Emil Ernerfeldt
b3b4fbc016 [slider] only show full precision if significant 2020-08-29 14:41:32 +02:00
Emil Ernerfeldt
cc22e2fbb4 [slider] when editing slider or drag-value, keep text edit box small 2020-08-29 12:17:49 +02:00
Emil Ernerfeldt
7cfa792a89 [interact] bug fix: fix drags sometimes being interpreted as clicks 2020-08-29 12:13:21 +02:00
Emil Ernerfeldt
d07132cc13 [demo] bug fix: add back clock in upper right corner 2020-08-29 12:12:16 +02:00
Emil Ernerfeldt
1f8d3a699f [egui_glium] sRGBA: blend vertex colors in linear space 2020-08-29 12:04:41 +02:00
Emil Ernerfeldt
3d7b5ea6fe [egui_web] sRGBA: blend vertex colors in linear space 2020-08-29 12:04:33 +02:00
Emil Ernerfeldt
d5a1385870 [demo] disable name clash demo, since it is not working anyway 2020-08-28 16:43:24 +02:00
Emil Ernerfeldt
a2160a5e12 fix some corner cases for repaint requests 2020-08-28 16:41:37 +02:00
Emil Ernerfeldt
0755a95c76 Update README.md 2020-08-28 16:24:20 +02:00
Emil Ernerfeldt
b8938e01c4 [demo] add menu option to auto-reorganize windows 2020-08-28 16:24:20 +02:00
Emil Ernerfeldt
559b026b87 [demo] add windows that demonstrates auto-size, resize and scrolling 2020-08-28 16:24:20 +02:00
Emil Ernerfeldt
b02530b6fb [refactor] small cleanup and typo fixes 2020-08-28 16:24:20 +02:00
Emil Ernerfeldt
0bbf7edaee [window] increase default width of windows and resize areas 2020-08-28 16:24:20 +02:00
Emil Ernerfeldt
03bc4ea2e2 [window] make scroll bars in windows opt-in 2020-08-28 16:24:20 +02:00
Emil Ernerfeldt
5ed949bb32 deny warnings in egui lib (again. oops) 2020-08-28 16:24:20 +02:00