Commit graph

1073 commits

Author SHA1 Message Date
Emil Ernerfeldt
53d0114d3c Rename MouseInput to CursorState 2021-01-17 02:34:21 +01:00
Emil Ernerfeldt
d0fc77fe9b [egui_glium] minor code cleanup 2021-01-17 02:31:37 +01:00
Emil Ernerfeldt
421e8bc91e Don't glob-include eveything in mod layers 2021-01-17 02:27:58 +01:00
Emil Ernerfeldt
4203944892 doc fixes 2021-01-17 02:17:57 +01:00
Emil Ernerfeldt
2854a84728 Improve documentation about how to write a painter for egui 2021-01-17 02:12:29 +01:00
Emil Ernerfeldt
8598c365a1 [epaint] Replace tuple (Rect, Shape) with tuple-struct ClippedShape 2021-01-17 01:40:14 +01:00
Emil Ernerfeldt
7b318887ee Put input/output data types into mod egui::data 2021-01-17 00:21:58 +01:00
Emil Ernerfeldt
d11b02d45e [emath] Add Pos2::zero() and Rect::clamp(point) 2021-01-17 00:21:31 +01:00
Emil Ernerfeldt
33545501f9 Simplified color picker 2021-01-16 20:55:02 +01:00
Emil Ernerfeldt
ef595153c9 [egui_web] Improve alpha blending + add WebGL2 painter 2021-01-16 20:48:00 +01:00
Emil Ernerfeldt
e1000da305 Make index.html background color brighter to make Egui pop 2021-01-16 19:11:08 +01:00
Emil Ernerfeldt
03c667149a TextEdit: only show cursor preview when moving mouse 2021-01-16 18:52:01 +01:00
Emil Ernerfeldt
01bee768d9 Add must_use to Shape 2021-01-16 18:49:10 +01:00
Emil Ernerfeldt
cc002763ed Add border around color button 2021-01-16 18:48:37 +01:00
Emil Ernerfeldt
2b48f9723b [grid] Fix the last corner cases and bugs 2021-01-16 18:37:11 +01:00
Emil Ernerfeldt
07f1b074ca [grid] Allow putting a separator in a grid 2021-01-16 11:48:30 +01:00
Emil Ernerfeldt
a5ce1ba711 Don't highlight window titles when interacting with the window
It is very distracting.
2021-01-16 01:47:21 +01:00
Emil Ernerfeldt
60006cd9c6 Highlight window name when clicking a window 2021-01-16 01:33:41 +01:00
Emil Ernerfeldt
620e43d483 New sleeker visual style
Remove a lot of borders, remove transparency, simplify and unify.
2021-01-15 22:23:08 +01:00
Emil Ernerfeldt
6d5eaeeafa [grid] Make striped slightly wider than contents 2021-01-15 21:21:17 +01:00
Emil Ernerfeldt
b1157ee642 [grid] Option to set spacing 2021-01-15 21:17:56 +01:00
Emil Ernerfeldt
480c6db37f [grid] Set default row height to interact_size.y
It is what we use for horizontal layouts, and makes sense.
2021-01-15 21:17:56 +01:00
Emil Ernerfeldt
03c9cda89b [grid] Ensure the contents of each grid cell is aligned left+center 2021-01-15 21:17:56 +01:00
Emil Ernerfeldt
db591bc56c Fix minor alignment/size issue in TextEdit 2021-01-15 21:17:52 +01:00
Emil Ernerfeldt
17d88c8187 [grid] Make the stripes fairly sizes 2021-01-15 18:30:09 +01:00
Emil Ernerfeldt
8e1c7625f1 [refactor] Simplify how ui calls placer after adding a widget 2021-01-15 18:30:09 +01:00
Emil Ernerfeldt
641a302e0a [grid] Add optional minimal row height 2021-01-15 18:30:09 +01:00
Emil Ernerfeldt
6f814b9516 [demo] Add collapsing header to widget gallery 2021-01-15 18:30:09 +01:00
Emil Ernerfeldt
9ce59d747f [style] Tweak collapsing header spacing 2021-01-15 18:30:09 +01:00
Emil Ernerfeldt
2b07a75753 [style] Tweak windows icon positioning 2021-01-15 18:30:05 +01:00
Emil Ernerfeldt
8e34cc50be [grid] only save state once 2021-01-14 22:29:00 +01:00
Emil Ernerfeldt
795906bb24 Add Window::current_pos to position a winodw 2021-01-13 23:19:36 +01:00
Emil Ernerfeldt
99726decb6 Add option to remove the frame from a TextEdit 2021-01-13 23:15:41 +01:00
Emil Ernerfeldt
fb5bd801b8 Fix minor size and alignment issue in SelectedLabel 2021-01-13 23:11:52 +01:00
Emil Ernerfeldt
73d16eb771 Use Grid to add labels to the color picker sliders
Also improve the color preview in the color picker
2021-01-13 23:09:23 +01:00
Emil Ernerfeldt
63d3e9e70b Auto-shrink grid 2021-01-13 23:09:23 +01:00
Emil Ernerfeldt
4ebaa53fea Fix problem with having a grid in an infinitely sized ui 2021-01-13 22:08:35 +01:00
Emil Ernerfeldt
b10dcf5012 [style] Tweak vertical text alignment 2021-01-13 22:08:35 +01:00
Emil Ernerfeldt
6d8a766614 [style] Slightly expand buttons when hovering and interacting 2021-01-13 22:08:35 +01:00
Emil Ernerfeldt
1b40a5dda5 [style] combo box: use the same text style as for a button 2021-01-13 22:08:35 +01:00
Emil Ernerfeldt
e9f8e5d6a3 Update changelog with InputState::key_down 2021-01-13 22:08:35 +01:00
Emil Ernerfeldt
08a4179e7e Add #[must_use] to all widget builders 2021-01-13 11:24:49 +01:00
Michael Tang
90797f04f4
Implement InputState::key_down (#107) 2021-01-12 13:46:27 +01:00
n2
449192e5fb
Text wrap correctly on Chinese chraracter (#104)
* Text wrap correctly on Chinese chrarcter

* Text wrap correctly on Chinese chraracter, checked by a stand-alone function
2021-01-12 10:15:51 +01:00
Emil Ernerfeldt
b6ba98a40f Adjust spacing between window buttons and the border 2021-01-12 00:01:57 +01:00
Emil Ernerfeldt
5e7ad40c8d [demo] Center the "(source code)" hyperlinks 2021-01-11 23:50:50 +01:00
Emil Ernerfeldt
f3b011a8cd Add widget gallery image to README.md 2021-01-11 21:09:48 +01:00
Emil Ernerfeldt
1c5cdd8575 [demo] Add separator, hyperlink and SelectableLabel to widget gallery 2021-01-11 21:07:17 +01:00
Emil Ernerfeldt
0b10fa5c29
Grid layout and widget gallery (#106)
* Wrap Layout and Region into a new struct Placer

* [egui] Add a simple grid layout

* Refactor CollapsingHeader code (simplify header painting)

* Fix: allow putting a CollapsingHeader inside of a grid layout

* [demo] Add a widget gallery

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

* Add optional striped grid background
2021-01-11 20:58:36 +01:00
Emil Ernerfeldt
d344c9d9a3 Image and ImageButton will no longer stretch to fill a justified layout 2021-01-11 18:14:34 +01:00