Commit Graph

233 Commits

Author SHA1 Message Date
Mårten Björk 35b9cbf27a Add Frame::set_traffic_lights_position for macOS custom title bars (#8494)
Adds `eframe::Frame::set_traffic_lights_position` for placing the native
macOS "traffic lights" (close/minimize/maximize buttons) inside a custom
title bar, e.g. when using
`ViewportBuilder::with_fullsize_content_view`.

## New API
```rust
impl eframe::Frame {
    /// Center the traffic lights vertically in `title_bar_y` (measured from the top of the window),
    /// with the close button `left_margin` from the left edge. Both in egui points.
    /// Call it every frame. Does nothing on other platforms.
    pub fn set_traffic_lights_position(
        &self,
        egui_ctx: &egui::Context,
        title_bar_y: egui::Rangef,
        left_margin: f32,
    );
}
```

Usage (from the `custom_window_frame` example):
```rust
frame.set_traffic_lights_position(
    ui.ctx(),
    title_bar_rect.y_range(),
    title_bar_rect.left() + 12.0,
);
```

## Details
* The buttons keep AppKit's native spacing.
* The native title bar is resized to cover the buttons, so they stay
clickable in title bars taller than the default.
* Units are egui points; the zoom factor is applied internally.
* It is immediate mode: AppKit resets the button positions whenever it
re-lays out the window (e.g. on resize), so call it every frame.
* No-op in fullscreen (the traffic lights live in a separate window
there) and on non-macOS platforms.

## Other changes
* `custom_window_frame` example: on macOS, uses a full-size content view
with the native traffic lights centered in the custom title bar, instead
of drawing its own buttons.
* `emath::Rangef` now supports `Rangef * f32`, `f32 * Rangef`, and
`Rangef / f32`.
* `WindowChromeMetrics::traffic_lights_size.y` now measures the top
margin from the top of the title bar (previously it was taken from the
bottom in AppKit's non-flipped coordinates), so the reported height may
change.

## Testing
Ran `custom_window_frame` on macOS: traffic lights stay centered when
resizing and zooming (cmd +/-).

* [x] I have followed the instructions in the PR template

🤖 This PR was written with Codex and Claude Code; Marten remains
responsible for the change.

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2026-10-06 15:25:45 +02:00
Emil Ernerfeldt 24c6061a58 Allow multiple GlyphRasterizers, with priority over installed fonts (#8545)
`GlyphRasterizer` now has a `FontPriority`:

* `FontPriority::Highest`: asked about every cluster, before any font.
Use it to override how specific glyphs looks
* `FontPriority::Lowest` (default): a fallback, only asked about
clusters no installed font (or `FontProvider`) has. Same as before.

Several rasterizers can be installed; within a tier they are asked in
order, and the first `Some` wins.

```rust
ctx.add_glyph_rasterizer(
    egui::GlyphRasterizer::new(|request| (request.cluster == "…").then(|| my_ellipsis(request)))
        .with_priority(egui::FontPriority::Highest),
);
```

API changes (all unreleased): `Context::set_glyph_rasterizer(Option)` →
`add_glyph_rasterizer` / `set_glyph_rasterizers(Vec)`, same on
`epaint::Fonts`.

Follow-up to:
* https://github.com/emilk/egui/pull/8512

* [x] I have followed the instructions in the PR template

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 13:09:13 +02:00
Emil Ernerfeldt e7c7b00a93 Deprecate Id::new and From<&str> for Id (#8534)
`Id::new` and `From<&str> for Id` etc are foot-guns: they hide the fact
that an `Id` MUST be globally unique (well, at least unique within your
app).

So this PR removes both and replaces them with `Id::unique`, which is
very explicit.
In places where non-uniqueness is desired, you can use `IdSalt`, which
has the convenient `From<&str>`.

Most changes are in tests.

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Lucas Meurer <hi@lucasmerlin.me>
2026-09-09 16:03:15 +02:00
Lucas Meurer 416dd85acb Make ViewportCommand::Screenshot callback based (#8489)
Migration guide for the changelog:
`ViewportCommand::Screenshot` was changed to be callback based.
Previously you needed to iter the input events to check for the
screenshot (but didn't need interior mutability):
```rs
[derive(Default)]
struct MyApp {
    screenshot: Option<Arc<egui::ColorImage>>,
}
impl eframe::App for MyApp {
    fn ui(&mut self, ui: &mut egui::Ui, _frame: &mut eframe::Frame) {
        if ui.button("Screenshot").clicked() {
            ui.send_viewport_cmd(ViewportCommand::Screenshot(UserData::default()));
        }

        let image = ui.input(|i| {
            i.events
                .iter()
                .filter_map(|e| {
                    if let egui::Event::Screenshot { image, .. } = e {
                        Some(Arc::clone(image))
                    } else {
                        None
                    }
                })
                .next_back()
        });
        
        if let Some(image) = image {
            self.screenshot = Some(image);
        }
    }
}
```

Now you need to use a mutex, channel, or some other sync primitive to
get the result:
```rs
#[derive(Default)]
struct MyApp {
    screenshot: Arc<Mutex<Option<Arc<egui::ColorImage>>>>,
}
impl eframe::App for MyApp {
    fn ui(&mut self, ui: &mut egui::Ui, _frame: &mut eframe::Frame) {
        if ui.button("Screenshot").clicked() {
            let ctx = ui.ctx().clone();
            let screenshot_mutex = self.screenshot.clone();
            ui.request_screenshot(move |screenshot| {
                screenshot_mutex.lock().replace(screenshot);
                ctx.request_repaint();
            });
        }
    }
}
```
----



This implements a callback-based screenshot api for egui

Upsides over `ViewportCommand::Screenshot`:
- More convenient api: `ctx.request_screenshot(|screnshot| ...)` (and no
need to downcast UserData)
- Reading screenshot data doesn't require rendering another frame
- Should allow us to add recording as a plugin without special hooks in
egui_kittest (otherwise capturing the last frame would have required
custom hooks in kittest)
- This was also a problem in
[kittest_inspector](https://github.com/rerun-io/kittest_inspector): When
streaming a real app, the frame seen was always a couple frames behind
when the app was idle
2026-09-08 16:06:18 +02:00
Lucas Meurer 5cb3a4f89e Add AtomLayoutStyle (#8465)
Extracts a shared struct with things that once might want to override
for any atomlayout-based widget.

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-02 11:27:17 +02:00
Lucas Meurer de077b92d3 Rename classes, more button options via StyleProvider (#8464)
Moves global classnames to e.g. `egui::class::ROOT`.

Widget specific classes live on the widgets struct. 

Adds some more classes for our buttons styling options (`CLASS_SMALL`
etc), so that custom `StyleProvider`s can choose to implement them
differently or ignore them altogether.


Also removes some styleproviders that were partly or completely unused
(e.g. basestyle / labelstyle). We can add them back once we actually
implement styling for those.

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-01 11:39:13 +02:00
YouStones 97603fc082 Theme plugin system (experimental) (#8153)
<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/main/CONTRIBUTING.md)
before opening a Pull Request!

* Keep your PR:s small and focused.
* The PR title is what ends up in the changelog, so make it descriptive!
* If applicable, add a screenshot or gif.
* If it is a non-trivial addition, consider adding a demo for it to
`egui_demo_lib`, or a new example.
* Do NOT open PR:s from your `master` branch, as that makes it hard for
maintainers to test and add commits to your PR.
* Remember to run `cargo fmt` and `cargo clippy`.
* Open the PR as a draft until you have self-reviewed it and run
`./scripts/check.sh`.
* When you have addressed a PR comment, mark it as resolved.

Please be patient! I will review your PR, but my time is limited!
-->

# What it does

Addition of a new system of theme plugins which allow the user to use
different rules engine to compute the style for the available
specialised widget style.

# How to use

Create a engine implementing the trait `ThemePlugin` and `ThemeStyle<S:
StyleStruct>` and implement the necessary methods, then register this
way (example for `ButtonStyle`):
```ui.add_theme::<ButtonStyle>(&mycustomengine);```

Now all button will call the `ThemeStyle<ButtonStyle>` method to compute the correct style and later use the cached value to avoid the costly computation.

If no valid `ThemeStyle<S>` or engine is available then it fallback to the default style.

* Closes part of <https://github.com/emilk/egui/issues/3284>
* [x] I have followed the instructions in the PR template

---------

Co-authored-by: adrien <221212@umons.ac.be>
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Lucas Meurer <hi@lucasmerlin.me>
2026-08-21 13:05:45 +00:00
Emil Ernerfeldt fd54387eac Clean up clippy lint config (#8437)
* [x] I have followed the instructions in the PR template

Remove clippy lint groups already covered by `all` (`complexity`,
`perf`, `suspicious`, and the misspelled `correctnesss`), and two
individual lints covered by the `cargo` group (`negative_feature_names`,
`wildcard_dependencies`).

Add `publish = false` to the two internal crates that were missing it
(`popups`, `egui_tests`), which silences the
`clippy::cargo_common_metadata` warnings.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-20 08:42:12 +00:00
Emil Ernerfeldt 6aea7eff94 Enable the clippy::std_instead_of_core lint (#8394)
Prefer `core::` over `std::` where either work

* Part of https://github.com/emilk/egui/issues/5735
2026-08-06 13:19:13 +02:00
Jochen Görtler 49d4befe6b Store web_sys::File inside of DroppedFile (#8354)
* Closes #4654
* Related #4667
* [x] I have followed the instructions in the PR template

This PR avoids materializing the contents of a file that was dragged
into an egui application on the web. It does so by storing the
`web_sys::File` handle directly on WASM.

This breaks the existing API of `DroppedFile` on the web, because there
is no way to retrieve the bytes synchronously form a `DroppedFile`
anymore, forcing handling call sites to become asynchronous.

The native API remains the same.

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2026-08-03 15:07:37 +00:00
Emil Ernerfeldt b730815797 Update MSRV from 1.92 to 1.95 (#8348)
No particular reason

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-28 08:37:03 +00:00
Emil Ernerfeldt 27559ef3fd Rename Panel methods (#8192)
The three methods for showing a `Panel` are now:

* `panel.show`: always show the panel.
* `panel.show_collapsible`: show or hide the panel, with a slide
animation in between.
* `Panel::show_switched`: animate between two different panels: a
thin/collapsed one and a thick/expanded one.
2026-05-24 12:22:32 +02:00
Emil Ernerfeldt e925a41419 Fix glyph caching on font variations (#8189)
* Closes https://github.com/emilk/egui/pull/8029

---------

Co-authored-by: lucasmerlin <hi@lucasmerlin.me>
2026-05-22 15:30:21 +02:00
Dmitry Skorobogaty fe8b1edfc6 Android example: document pre-requisites and fix code for rust 1.92.0 (#8122)
* [x] I have followed the instructions in the PR template

```
+ echo 'All checks passed.'
All checks passed.
```

I had to update `.png`'s for tests to pass, but I guess it's specific to
my laptop.

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2026-04-27 11:52:58 +02:00
Emil Ernerfeldt db87c712a1 Replace cargo machete with cargo shear (#8094)
We've had good experiences with `cargo shear` at Rerun
2026-04-13 17:48:43 +02:00
Emil Ernerfeldt 4a09782fce Enable a few more clippy lints (#8064)
Enable these new clippy lints and fix all warnings:

* `format_push_string` — use `write!` instead of `s += &format!(…)` to
avoid extra allocations
* `ignored_unit_patterns` — use `()` instead of `_` when matching unit
* `missing_fields_in_debug` — ensure manual `Debug` impls account for
all fields
* `needless_raw_string_hashes` — remove unnecessary `r#` on string
literals
* `ref_option` — prefer `Option<&T>` over `&Option<T>` in function
signatures
2026-04-04 16:20:29 +02:00
Emil Ernerfeldt c2b482ff7e Flip if-else:s with a negation (#8063) 2026-04-04 12:03:41 +02:00
Emil Ernerfeldt a12d18d9bd Replace chrono with jiff (#8008)
`jiff` is more modern, and seem to be where the ecosystem is heading.
2026-03-24 13:58:21 +01:00
Jasper Riedel 661d5f9173 Update MSRV from 1.88 to 1.92 (#7793) 2025-12-20 13:52:34 +01:00
Emil Ernerfeldt 8d98763fe1 Replace #[allow attributes with expect (#7796)
We do have `clippy::allow_attributes` turned on, but it doesn't seem to
work properly
2025-12-19 20:55:50 +01:00
Emil Ernerfeldt 7fe58bbfd4 Forbid uses of unwrap() in the code (#7795) 2025-12-19 20:34:18 +01:00
Emil Ernerfeldt 986c2c0ffb Use explicit Arc::clone to clarify when clones are cheap (#7784) 2025-12-17 17:19:18 +01:00
Emil Ernerfeldt 6157a35985 Deprecate CentralPanel::show (#7783)
* Part of https://github.com/emilk/egui/issues/3524

Use `show_inside` instead, with a `Ui` instead of a `Context`
2025-12-17 16:39:13 +01:00
Emil Ernerfeldt 14643b56a8 Deprecate using Panel directly on a Context (#7781)
Use `Panel::show_inside(ui)` instead!
2025-12-16 17:20:42 +01:00
Emil Ernerfeldt 2f6fe9c572 eframe: Replace Frame::update with fn logic and fn ui (#7775)
* Part of https://github.com/emilk/egui/issues/5113
* Part of https://github.com/emilk/egui/issues/3524

## What
This deprecates `eframe::App::update` and replaces it with two new
functions:

```rs
pub trait App {
	/// Called just before `ui`, and in the future this will
    /// also be called for background apps when needed.
	fn logic(&mut self, ctx: &egui::Context, frame: &mut Frame) { }
	
    /// Show your user interface to the user.
	fn ui(&mut self, ui: &mut egui::Ui, frame: &mut Frame);

	…
}
```

Similarly, `Context::run` is deprecated in favor of `Context::run_ui`.

`Plugin`s are now handed a `Ui` instead of just a `Context` in
`on_begin/end_frame`.

## TODO
…either in this PR or a later one
* [x] Deprecate `App::update`
* [x] Deprecate `Context::run`
* [x] Change plugins to get a `Ui`
* [x] Update kittest
* [x] Change viewports to get UI:s (`show_viewport_immediate` etc)
  - https://github.com/emilk/egui/pull/7779

## Later PRs
* [ ] Deprecate `Panel::show`
* [ ] Deprecate `CentralPanel::show`
* [ ] Deprecate `CentralPanel` ?
2025-12-16 17:05:50 +01:00
Emil Ernerfeldt 9487dc35ec Viewports: give the caller a Ui instead of Context (#7779)
* Part of https://github.com/emilk/egui/issues/3524

This is a breaking change, as it changes the how embedded viewports
work.
Before it was up to the user to display a `egui::Window` if they wanted.
Now egui creates an `egui::Window` for you, so you only need to add the
contents.

To signal this change in behavior, `ViewportClass::Embedded` is gone and
is now called `ViewportClass::EmbeddedWindow`.
2025-12-15 18:51:57 +01:00
Emil Ernerfeldt bfaf1b44f2 Replace ui.ctx().foo with ui.foo in a few places (#7774)
Internal code cleanup after
* https://github.com/emilk/egui/pull/7770
2025-12-14 17:12:10 +01:00
Emil Ernerfeldt 453e34b4df Rename functions in Context to avoid confusion (#7773)
It's important to avoid confusion after
* https://github.com/emilk/egui/pull/7770
2025-12-14 16:49:51 +01:00
Emil Ernerfeldt bc48599f65 Rename Context::style to global_style; avoid confusion w/ Ui::style (#7772)
This is important after
* https://github.com/emilk/egui/pull/7770
2025-12-14 16:41:13 +01:00
Johnchoi913 06e632535b Enable feature for example custom_3d_glow (#7730)
<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/main/CONTRIBUTING.md)
before opening a Pull Request!

* Keep your PR:s small and focused.
* The PR title is what ends up in the changelog, so make it descriptive!
* If applicable, add a screenshot or gif.
* If it is a non-trivial addition, consider adding a demo for it to
`egui_demo_lib`, or a new example.
* Do NOT open PR:s from your `master` branch, as that makes it hard for
maintainers to test and add commits to your PR.
* Remember to run `cargo fmt` and `cargo clippy`.
* Open the PR as a draft until you have self-reviewed it and run
`./scripts/check.sh`.
* When you have addressed a PR comment, mark it as resolved.

Please be patient! I will review your PR, but my time is limited!
-->

* Small fix, no issue opened
* [x] I have followed the instructions in the PR template
2025-12-14 15:23:41 +01:00
Emil Ernerfeldt d5869bfeaf Remove some uses of top-level panels in our examples (#7729)
We're phasing out top-level panels (panels that use `Context` directly,
instead of being inside another `Ui`).
As a first step, stop using them in our demo library and application.

* Part of https://github.com/emilk/egui/issues/3524
2025-11-21 20:22:01 +01:00
Bruno Paré-Simard 5b6a0196f9 Add Panel to replace SidePanel and TopBottomPanel (#5659)
This combines `SidePanel` and `TopBottomPanel` into a single `Panel`.

The old types are still there as type aliases, but are deprecated.

`.min_width(…)` etc are now called `.min_size(…)` etc.

Again, the old names are still there, but deprecated.

(edited by @emilk)

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2025-11-18 15:46:01 +01:00
Lucas Meurer 96470fabee Release 0.33.0 - egui::Plugin, better kerning, kitdiff viewer (#7622)
## Short bluesky announcement:

We just released egui 0.33.0! 

Highlights:
- `egui::Plugin` a improved way to create and access egui plugins
- [kitdiff](https://github.com/rerun-io/kitdiff), a viewer for
egui_kittest image snapshots (and a general image diff tool)
- better kerning (check the diff on
[kitdiff](https://rerun-io.github.io/kitdiff/?url=https://github.com/emilk/egui/pull/7431))


https://github.com/user-attachments/assets/971f0493-6dae-42e5-8019-58b74cf5d203


## Relaese Changelog:

egui is an easy-to-use immediate mode GUI for Rust that runs on both web
and native.

Try it now: <https://www.egui.rs/>

egui development is sponsored by [Rerun](https://www.rerun.io/), a
startup building an SDK for visualizing streams of multimodal data.

# egui 0.33.0 changelog

Highlights from this release:
- `egui::Plugin` a improved way to create and access egui plugins
- [kitdiff](https://github.com/rerun-io/kitdiff), a viewer for
egui_kittest image snapshots (and a general image diff tool)
- better kerning


### Improved kerning
As a step towards using [parley](https://github.com/linebender/parley)
for font rendering, @valadaptive has refactored the font loading and
rendering code. A result of this (next to the font rendering code being
much nicer now) is improved kerning.
Notice how the c moved away from the k:

![Oct-09-2025
16-21-58](https://github.com/user-attachments/assets/d4a17e87-5e98-40db-a85a-fa77fa77aceb)


### `egui::Plugin` trait
We've added a new trait-based plugin api, meant to replace
`Context::on_begin_pass` and `Context::on_end_pass`.
This makes it a lot easier to handle state in your plugins. Instead of
having to write to egui memory it can live right on your plugin struct.
The trait based api also makes easier to add new hooks that plugins can
use. In addition to `on_begin_pass` and `on_end_pass`, the `Plugin`
trait now has a `input_hook` and `output_hook` which you can use to
inspect / modify the `RawInput` / `FullOutput`.

### kitdiff, a image diff viewer
At rerun we have a ton of snapshots. Some PRs will change most of them
(e.g. [the](https://github.com/rerun-io/rerun/pull/11253/files)
[one](https://rerun-io.github.io/kitdiff/?url=https://github.com/rerun-io/rerun/pull/11253/files)
that updated egui and introduced the kerning improvements, ~500
snapshots changed!).
If you really want to look at every changed snapshot it better be as
efficient as possible, and the experience on github, fiddeling with the
sliders, is kind of frustrating.
In order to fix this, we've made
[kitdiff](https://rerun-io.github.io/kitdiff/).
You can use it locally via 
- `kitdiff files .` will search for .new.png and .diff.png files
- `kitdiff git` will compare the current files to the default branch
(main/master)
Or in the browser via
- going to https://rerun-io.github.io/kitdiff/ and pasting a PR or
github artifact url
- linking to kitdiff via e.g. a github workflow
`https://rerun-io.github.io/kitdiff/?url=<link_to_pr_or_artefact>`

To install kitdiff run `cargo install --git
https://github.com/rerun-io/kitdiff`

Here is a video showing the kerning changes in kitdiff ([try it
yourself](https://rerun-io.github.io/kitdiff/?url=https://github.com/rerun-io/rerun/pull/11253/files)):


https://github.com/user-attachments/assets/74640af1-09ba-435a-9d0c-2cbeee140c8f

###  Migration guide
- `egui::Mutex` now has a timeout as a simple deadlock detection
- If you use a `egui::Mutex` in some place where it's held for longer
than a single frame, you should switch to the std mutex or parking_lot
instead (egui mutexes are wrappers around parking lot)
- `screen_rect` is deprecated
- In order to support safe areas, egui now has `viewport_rect` and
`content_rect`.
- Update all usages of `screen_rect` to `content_rect`, unless you are
sure that you want to draw outside the `safe area` (which would mean
your Ui may be covered by notches, system ui, etc.)
2025-10-09 19:14:14 +02:00
Emil Ernerfeldt d50287b83c Add taplo.toml for toml formatting (#7618) 2025-10-09 15:38:00 +02:00
Anthony S. d1fcd740de Include screenshot in popups README (#7562)
Add missing screenshot to README for popups example

Co-authored-by: Lucas Meurer <hi@lucasmerlin.me>
2025-10-09 09:41:20 +02:00
Emil Ernerfeldt 843ceea90c Use more workspace dependencies (#7596) 2025-10-07 15:07:16 +02:00
Ian Hobson 30277233ce Add support for the safe area on iOS (#7578)
This PR is a continuation of #4915 by @frederik-uni and @lucasmerlin
that introduces support for keeping egui content within the 'safe area'
on iOS (avoiding the notch / dynamic island / menu bar etc.), with the
following changes:

- `SafeArea` now wraps `MarginF32` and has been renamed to
`SafeAreaInsets` to clarify its purpose.
- `InputState::screen_rect` is now marked as deprecated in favour of
either `viewport_rect` (which contains the entire screen), or
`content_rect` (which is the viewport rect with the safe area insets
removed).
- I added some comments to the safe area insets logic pointing out the
[safe area API coming in winit
v0.31](https://github.com/rust-windowing/winit/issues/3910).

---------

Co-authored-by: frederik-uni <147479464+frederik-uni@users.noreply.github.com>
Co-authored-by: Lucas Meurer <hi@lucasmerlin.me>
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2025-10-07 12:30:09 +02:00
Emil Ernerfeldt bd45406fad Use a lot more let-else (#7582) 2025-10-02 19:47:00 +02:00
Andreas Reich 4c1f344ef8 Update MSRV from 1.86 to 1.88 (#7579)
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2025-10-02 19:12:29 +02:00
Emil Ernerfeldt 531ead5ad1 Update MSRV to 1.86 (#7469) 2025-08-21 15:38:41 +02:00
Emil Ernerfeldt 3024c39eaf Enable and fix some more clippy lints (#7426)
One can never have too many lints
2025-08-08 09:57:53 +02:00
Emil Ernerfeldt ef039aa566 Enable more clippy lints (#7418)
More is more!
2025-08-05 19:47:26 +02:00
Emil Ernerfeldt fabd4aa7a5 Release 0.32.0 - Atoms, popups, and better SVG support (#7329) 2025-07-10 16:58:39 +02:00
Emil Ernerfeldt b2995dcb83 Use Rust edition 2024 (#7280) 2025-06-30 14:01:57 +02:00
Emil Ernerfeldt 962c8e26a8 Update MSRV to 1.85 (#7279) 2025-06-30 13:43:27 +02:00
Emil Ernerfeldt b8dfb138b6 Remove outdated link in README 2025-06-07 10:24:41 -07:00
Piotr Podusowski 12cd35f48c Disallow accesskit on Android NativeActivity, making hello_android working again (#6855)
Follow up for https://github.com/emilk/egui/pull/6766

I wasn't sure if `compile_error` is appropriate. It felt right.
2025-05-18 13:17:28 +02:00
Emil Ernerfeldt d0876a1a60 Rename master branch to main (#7034)
For consistency with other repositories, i.e. so I can write `git
checkout main` without worrying which repo I'm browsing.
2025-05-08 09:15:42 +02:00
Will Brown c075053391 Add external eventloop support (#6750)
<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/master/CONTRIBUTING.md)
before opening a Pull Request!

* Keep your PR:s small and focused.
* The PR title is what ends up in the changelog, so make it descriptive!
* If applicable, add a screenshot or gif.
* If it is a non-trivial addition, consider adding a demo for it to
`egui_demo_lib`, or a new example.
* Do NOT open PR:s from your `master` branch, as that makes it hard for
maintainers to test and add commits to your PR.
* Remember to run `cargo fmt` and `cargo clippy`.
* Open the PR as a draft until you have self-reviewed it and run
`./scripts/check.sh`.
* When you have addressed a PR comment, mark it as resolved.

Please be patient! I will review your PR, but my time is limited!
-->

* Closes #2875
* Closes https://github.com/emilk/egui/pull/3340
* [x] I have followed the instructions in the PR template

Adds `create_native`. Similiar to `run_native` but it returns an
`EframeWinitApplication` which is a `winit::ApplicationHandler`. This
can be run on your own event loop. A helper fn `pump_eframe_app` is
provided to pump the event loop and get the control flow state back.

I have been using this approach for a few months.

---------

Co-authored-by: Will Brown <opensource@rebeagle.com>
2025-04-29 12:09:23 +02:00
Emil Ernerfeldt f9245954eb Enable more clippy lints (#6853)
* Follows https://github.com/emilk/egui/pull/6848
2025-04-24 17:32:50 +02:00