Emil Ernerfeldt
0fa4bb9c64
Clean up all Cargo.toml: put features higher, and document them better
3 years ago
Emil Ernerfeldt
47038c631e
Update image 0.23 -> 0.24
3 years ago
Emil Ernerfeldt
c3be566574
egui-winit: Automatically detect and apply dark or light mode ( #1045 )
3 years ago
Emil Ernerfeldt
fa43d16c41
Choose your own font and size ( #1154 )
* Refactor text layout: don't need &Fonts in all functions
* Replace indexing in Fonts with member function
* Wrap Fonts in a Mutex
* Remove mutex for Font::glyph_info_cache
* Remove RwLock around Font::characters
* Put FontsImpl and GalleyCache behind the same Mutex
* Round font sizes to whole pixels before deduplicating them
* Make TextStyle !Copy
* Implement user-named TextStyle:s
* round font size earlier
* Cache fonts based on family and size
* Move TextStyle into egui and Style
* Remove body_text_style
* Query graphics about max texture size and use that as font atlas size
* Recreate texture atlas when it is getting full
3 years ago
Emil Ernerfeldt
462f181db3
Partial font texture update ( #1149 )
3 years ago
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
3 years ago
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>
3 years ago
Emil Ernerfeldt
753d709d3d
Hide console on windows for all examples in release builds ( #1008 )
3 years ago
Emil Ernerfeldt
0146c7e7fc
Release 0.16.0 - Context menus and rich text
3 years ago
Emil Ernerfeldt
190c85a40f
Rename `Texture` to `FontImage`
3 years ago
Emil Ernerfeldt
cda4c8ba13
Minor cleanup following https://github.com/emilk/egui/pull/999
3 years ago
Emil Ernerfeldt
b7441eeee7
Make epi::Frame cloneable so you can allocate textures in other threads ( #999 )
Closes https://github.com/emilk/egui/issues/673
Also adds `epi::Image`
3 years ago
Emil Ernerfeldt
d5efa4bbca
1.56 fix: missing_crate_level_docs -> rusdoc::missing_crate_level_docs
3 years ago
Emil Ernerfeldt
c60d17b91b
Set MSRV to 1.56.0 and use rust edition 2021 ( #998 )
3 years ago
Jay Oster
dd99f68e82
Update winit to 0.26 ( #930 )
Also update glium, glutin and rfd
3 years ago
d10sfan
90757ca221
Add Button::image_and_text ( #832 )
* Support image button with text
* Add example (`cargo run --example native_texture`)
3 years ago
Emil Ernerfeldt
105cb57050
Clean up glsl code
3 years ago
Emil Ernerfeldt
ddd5f6f4f6
winit: don't explicitly handle Cmd-Q and Alt-F4 ( #881 )
Closes https://github.com/emilk/egui/issues/877
Still a problem: https://github.com/rust-windowing/winit/issues/1998
3 years ago
Emil Ernerfeldt
49e43885ff
Replace `Context::begin_frame/end_frame` with `fn run` taking a closure ( #872 )
* Replace Context begin_frame/end_frame with `fn run` taking a closure
* Create `egui::__run_test_ui` to replace `Ui::__test`
* Add helper `egui::__run_test_ctx` for doctests
3 years ago
Emil Ernerfeldt
1dbe608e73
Refactor integrations ( #871 )
* Unify code in egui_glium and egui_glow into egui_winit::EpiIntegration
* Simplify `EguiGlium` interface
* Simplify `EguiGlow` interface
* egui_web refactor: merge `WebBackend` into `AppRunner`
3 years ago
Emil Ernerfeldt
09b8269326
Rich text for all widgets ( #855 )
Introduce `RichText` and `WidgetText`
3 years ago
Emil Ernerfeldt
78dfde40b2
Remove deprecated functions
3 years ago
Emil Ernerfeldt
08cc07bb2d
Release 0.15.0 - Syntax highlighting, hscroll, egui-winit and egui_glow
3 years ago
Emil Ernerfeldt
a3ba85dbb3
Improve docs
3 years ago
Caleb Smith
79d1ede496
Add `Frame::set_window_title()` ( #828 )
* Add `Frame::set_window_title()`
* Changelog and fmt for `Frame::set_window_title()`
Co-authored-by: Caleb Smith <caleb@myrvmail.com>
3 years ago
Emil Ernerfeldt
d97a369c44
End statements with semicolon (clippy::semicolon_if_nothing_returned)
3 years ago
Emil Ernerfeldt
a0cd41755e
Add more clippy lints
3 years ago
Emil Ernerfeldt
19a2a57f80
Rename and clean-up the "pure" glium and glow examples
3 years ago
Emil Ernerfeldt
8178d23d19
Deduplicate code found in both egui_glium and egui_glow ( #819 )
* Move window building to egui-winit
* Move icon loading to egui-winit
* `use glow::HasContext;` -> `use glow::HasContext as _;`
* Move FileStorage into epi behind a feature flag
* De-duplicate screen_size_in_pixels and native_pixels_per_point
* Move creation of FileStorage to epi
* Handle epi app output (window size changes etc) in egui-winit
* Move app and memory persistence and autosave logic to egui-winit
* fix check.sh
* Make the epi backend opt-in for egui_glium and egui_glow
* Fix persistence
* Add integration name to epi::IntegrationInfo and the demo
* Clean up Cargo.toml files and fix making egui_glium optional
* fix typo
* Make egui_glium compile without the `epi` feature
3 years ago
Emil Ernerfeldt
844dd9d7a4
Remove "seconds_since_midnight" from epi/eframe. Use chrono instead
chrono works both natively and on web.
Related: https://github.com/emilk/egui/issues/212
3 years ago
Emil Ernerfeldt
df3aeab434
Update egui_glium and egui_web changelogs
3 years ago
Emil Ernerfeldt
e2bdd40985
Move WindowSettings from egui_glium to egui-winit
3 years ago
Emil Ernerfeldt
3e1db880dc
Revert change to winit event loop in egui_glium ( #756 )
* Revert change to winit event loop in egui_glium
This reverts https://github.com/emilk/egui/pull/631
Fixes https://github.com/emilk/egui/issues/755
* Add example of file dialogs and file drag-and-drop
* fix ci
3 years ago
Emil Ernerfeldt
5539dbe620
Add separate serialize feature and better persitence control ( #753 )
* Rename epaint feature "persistence" to "serialize"
* Add separate "serialize" feature to egui
* egui_demo_lib: separate serialize and persistence features
* Add App::persist_native_window and App::persist_egui_memory
Controls what gets persisted
3 years ago
zu1k
f6fb4d942a
epi: drag native window ( #728 )
* feat: drag window
* Update epi/src/lib.rs
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* Update egui_demo_lib/src/backend_panel.rs
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* cargo fmt
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
3 years ago
Emil Ernerfeldt
1b36863248
Split out new crate egui-winit from egui_glium ( #735 )
3 years ago
Emil Ernerfeldt
cf17cb2065
egui_glium: allow sharing a native glium texture using Rc
3 years ago
Emil Ernerfeldt
cfb6b31914
Improve native_texture.rs demo
3 years ago
Emil Ernerfeldt
a5a5d6176d
Improve the frame around ImageButton
Helps https://github.com/emilk/egui/issues/721
3 years ago
Emil Ernerfeldt
e7cfda4941
Shape refactor ( #705 )
* More introspection stats about vertices/indices etc
* more serde derive
* #[inline] to Shape constructors
* Introduce RectShape
* Introduce CircleShape
* Introduce PathShape
* More serde derive
* impl Copy for RectShape and CircleShape
* Simplify some code
* More serde derive
* Add helpers for appending more input or output
* Serde derives for RawInput
* Rename Fonts::from_definitions to Fonts::new
* Add Output::take
* refactor EguiGlium slightly
* Derive PartialEq for RawInput
* Improve egui::util::History interface
* tweaks
* Improve History filter: add minimum length
* Calculate galley bounding rect
* tessellator: cull line segments and paths
* tessellator: cull meshes
* Fix bug in History bandwidth estimator
3 years ago
Emil Ernerfeldt
f37180f7dc
Bump MSRV (Minimum Supported Rust Version) to 1.54.0 ( #703 )
1.51.0 clippy has been giving me trouble (not reporting all problems),
and so I take the easy way out and just bump MSRV.
We will upgrade to 1.56.0 once it comes around anyway
to get access to that sweet disjoint capture in closures
(https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html )
3 years ago
zu1k
19eed94499
feat: Set whether to show decorations ( #672 )
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
3 years ago
Emil Ernerfeldt
249876523d
Increase scroll-speed on glium from 8 to 50 points per scroll tick
Closes https://github.com/emilk/egui/issues/461
Closes https://github.com/emilk/egui/pull/702
3 years ago
triangle drawer
203d571c8b
Add api for accessing backend texture via epi ( #695 )
* Define NativeTexture trait for offscreen rendering
add demo for NativeTexture trait
* write changelog
* add comment for native texture example
* formatting
* add license of Rust logo
* NativeTexture trait method rename
remove duplicate function with native texture
remove rust logo
* deprecated notice for register_glium_texture,register_webgl_texture
* collect deprecated notice
3 years ago
Emil Ernerfeldt
3b75a84d3b
Point crate repository & homepage urls to their subfolders
3 years ago
Emil Ernerfeldt
9598596bdc
Replace all http code in epi/eframe/egui_glium/egui_web with ehttp ( #697 )
I've extracted all the http request code and turned it
into its own crate at <https://github.com/emilk/ehttp >.
There was never a reason for the HTTP request library to be part of
`eframe`. Much better to have it as its own crate!
3 years ago
JerzySpendel
56502fbb3c
Make paint function accept anything implementing Surface trait ( #681 )
* Make paint function accept anything implementing Surface trait
* Remove unused imports
3 years ago
Emil Ernerfeldt
e98ae2ea7a
Revert "feat: Set whether to show decorations ( #660 )" ( #671 )
This reverts commit 0db74f3000
.
3 years ago
zu1k
0db74f3000
feat: Set whether to show decorations ( #660 )
* feat: Set whether to show decorations
* cargo fmt
* Update comment and changelog
3 years ago
Emil Ernerfeldt
fe2b3e26aa
egui_glium: add bool to simulate touch screens to test egui
3 years ago