Emil Ernerfeldt
dfc5f5b627
Cache fonts based on family and size
2022-01-22 23:10:33 +01:00
Emil Ernerfeldt
bb7ff84db5
round font size earlier
2022-01-22 23:01:15 +01:00
Emil Ernerfeldt
1aceaefba3
Implement user-named TextStyle:s
2022-01-22 18:30:13 +01:00
Emil Ernerfeldt
4f98f26fda
Make TextStyle !Copy
2022-01-22 18:30:13 +01:00
Emil Ernerfeldt
0df77d9074
Round font sizes to whole pixels before deduplicating them
2022-01-22 18:30:13 +01:00
Emil Ernerfeldt
67c58ace27
Put FontsImpl and GalleyCache behind the same Mutex
2022-01-22 18:30:13 +01:00
Emil Ernerfeldt
93d5e222db
Remove RwLock around Font::characters
2022-01-22 18:30:13 +01:00
Emil Ernerfeldt
2fe3dd0c58
Remove mutex for Font::glyph_info_cache
2022-01-22 18:30:13 +01:00
Emil Ernerfeldt
b0196527e5
Wrap Fonts in a Mutex
2022-01-22 18:30:13 +01:00
Emil Ernerfeldt
d70c80569f
Replace indexing in Fonts with member function
2022-01-22 18:30:13 +01:00
Emil Ernerfeldt
0a15163fab
Refactor text layout: don't need &Fonts in all functions
2022-01-22 18:30:13 +01:00
bthehacker
dba949240f
Fix eframe changelog links to other changelogs ( #1146 )
...
Links to the changelogs of egui_web, egui-winit, and egui_glium were broken and led to a 404, fixed them by adding "../"
2022-01-22 11:33:39 +01:00
Emil Ernerfeldt
462f181db3
Partial font texture update ( #1149 )
2022-01-22 11:23:12 +01:00
Juan Campa
343f7da564
Add ability to override collapsing icons ( #1147 )
2022-01-22 10:32:02 +01:00
Emil Ernerfeldt
e957674467
glow on web: simplify the webgl2 vs webgl1 selection
2022-01-22 09:07:41 +01:00
Emil Ernerfeldt
199bbef77b
Add misc documentation
2022-01-22 09:07:41 +01:00
Emil Ernerfeldt
8138a073e7
glow: reuse the same GL texture when possible ( #1142 )
2022-01-21 19:51:52 +01:00
awaken1ng
30f9700f6c
egui-web: Update web_location_hash
when hash in URL changes ( #1140 )
2022-01-21 19:41:18 +01:00
Emil Ernerfeldt
a689b623a6
Make shift-scroll do horizontal scrolling on all platforms ( #1136 )
...
Closes https://github.com/emilk/egui/issues/1135
2022-01-21 10:48:44 +01:00
Dusty DeWeese
e4aa1e6e1a
Make color_picker_hsva_2d
public. ( #1091 )
...
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2022-01-19 11:28:26 +01:00
Emil Ernerfeldt
76ac41f9b5
WidgetGallery: hide spinner widget to save CPU in reactive mode
2022-01-17 19:57:32 +01:00
Emil Ernerfeldt
9df0c68a38
Small improvements to check.sh
2022-01-17 19:57:32 +01:00
Emil Ernerfeldt
39dd6d7644
clippy fixes
2022-01-17 19:57:32 +01:00
Erlend Walstad
ab77099781
eframe: allow aborting an exit event ( #1038 )
2022-01-17 18:45:09 +01:00
BctfN0HUK7Yg
87ac7446da
Add new function to animate f32 values ( #1039 )
...
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2022-01-17 14:57:09 +01:00
BctfN0HUK7Yg
d6b32b7956
Add set margin method to TextEdit ( #1104 )
2022-01-17 14:56:27 +01:00
Jay Oster
ffa1b6bd43
egui-winit: re-enable window transparency ( #1126 )
...
`winit` 0.26.1 fixes the crash on Windows 11
2022-01-17 14:32:16 +01:00
Max Wase
5bedf73566
Add a link to the source code of a fractal_clock example ( #1029 )
2022-01-17 14:30:57 +01:00
Mingun
87ae77aab0
Add some improvements in the documentation ( #1056 )
...
* Better documentation for align.rs
* Document some painting methods
* Fix broken intra-doc links
* Add some internal documentation for Window TitleBar
2022-01-16 22:06:28 +01:00
Juan Campa
624e2fcfc1
Follow style for corner radius for SelectableLabel
2022-01-16 22:04:11 +01:00
Emil Ernerfeldt
c713fd98dd
Fix horizontal scrolling direction on Linux
...
Closes https://github.com/emilk/egui/issues/356
Work-around until https://github.com/rust-windowing/winit/pull/2105 is merged and released
2022-01-16 09:49:22 +01:00
Emil Ernerfeldt
ad5418777d
Fix dead-lock in TextEdit on touch-screens ( #1118 )
...
Introduced in https://github.com/emilk/egui/pull/1035
Fixes https://github.com/emilk/egui/issues/1116
2022-01-15 22:40:53 +01:00
Emil Ernerfeldt
b2c8cd0867
Simplify http demo and add new download_image eframe demo
2022-01-15 20:34:03 +01:00
Emil Ernerfeldt
66d80e2519
Texture loading in egui ( #1110 )
...
* Move texture allocation into epaint/egui proper
* Add TextureHandle
* egui_glow: cast using bytemuck instead of unsafe code
* Optimize glium painter
* Optimize WebGL
* Add example of loading an image from file
2022-01-15 13:59:52 +01:00
dvec
6c616a1b69
egui_glow: Reduce memory allocations in Painter::set_texture ( #1096 )
...
Use bytemuck::cast_slice
2022-01-12 11:33:06 +01:00
dvec
d9cfeff72c
egui_glow: Optimize Painter::set_texture ( #1093 )
2022-01-11 09:58:51 +01:00
Emil Ernerfeldt
205e04aa18
Fix bugs in glow on web ( #1092 )
...
* Re-add check of WEBGL_debug_renderer_info to avoid OpenGL error
I removed this check in https://github.com/emilk/egui/pull/1020
because it produced a warning on Firefox. Better a warning
than an OpenGL error though.
* Bug fix: don't ask for webgl context and then later for webgl2 context
The browser will only allow the first thing we check, so this will
prevent webgl2 from working.
2022-01-10 23:19:30 +01:00
Emil Ernerfeldt
d5673412dd
Put everything in Context behind the same Mutex ( #1050 )
...
* Move all interior mutability from Context to CtxRef and make it a handle
* Rename `CtxRef` to `Context`
* The old `Context` is now `ContextImpl` and is non-pub
* Add benchmark Painter::rect
Co-authored-by: Daniel Keller <dklr433@gmail.com>
2022-01-10 23:13:10 +01:00
Simon Werner
225d2b506d
Split Event::Text
into Text
and Paste
( #1058 )
...
* Split `Event::Text` into `Text` and `Paste`
* Added explicit Event::Paste change
See #1043
* Link to PR in changelog (not the issue)
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2022-01-10 23:12:30 +01:00
Emil Ernerfeldt
650057dd4a
Improve OpenGL error detection and reporting in egui_glow
...
May help to diagnose https://github.com/emilk/egui/issues/1087
2022-01-09 23:04:00 +01:00
Lampsitter
611eaa52e8
Revert "Don't constrain immovable egui windows to native window ( #1049 )" ( #1054 )
...
This reverts commit 7b641be7b0
.
It accidentally disabled constraining for all windows
2022-01-09 15:32:09 +01:00
Emil Ernerfeldt
342737e2f0
Improve a couple of docstrings
2022-01-08 11:15:15 +01:00
Lampsitter
7b641be7b0
Don't constrain immovable egui windows to native window ( #1049 )
2022-01-08 10:07:02 +01:00
Emil Ernerfeldt
1f93c7b0b6
Implement Clone & PartialEq on RichText WidgetTextJob WidgetTextGalley
2022-01-07 15:22:21 +01:00
Justin Jaffray
4fe5fa6c59
egui_glow: Add function to set the texture filter ( #1041 )
...
* Allow setting the scale filter for `glow` backend
This commit adds a `set_scale_filter` method to the `glow` painter so that
textures can be set to scale using nearest-neighbour scaling rather than
linear. This is useful for pixel art.
I wasn't entirely sure what kind of API you want for this kind of change so I
went with what seemed least intrusive, I don't mind doing something more
holistic if this isn't what you had in mind.
* Rename scale_filter -> texture_filter
* Store the TextureFilter directly
* PR link in changelog
* Use inter-doc links
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2022-01-06 17:09:53 +01:00
Lampsitter
b0ea4dc0b5
Fix context menu styling ( #1043 )
2022-01-06 12:17:12 +01:00
Emil Ernerfeldt
7863f44111
Add demo of advanced TextEdit usage
2022-01-06 11:53:23 +01:00
Lampsitter
d31f7d6522
Faster dashed line generation ( #1027 )
...
* Faster dashed lines generation
* Add dashed_line benchmark
2022-01-06 10:44:53 +01:00
Emil Ernerfeldt
79cfdaa1f9
Better docs and spelling fixes
2022-01-03 23:58:06 +01:00
Niklas Korz
01015ac94c
Use instant
crate in egui-winit for WebAssembly support ( #1023 )
...
* Replace `std::time::Instant` with wasm-compatible `instant::Instant`
* Change version requirement for instant to be compatible to winit
* Enable wasm-bindgen feature for instant
* Update lockfile
* Update changelog
* sort dependencies
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2022-01-03 22:13:53 +01:00