egui/crates/egui_demo_lib
giuseppeferrari c6bd30642a
Avoid infinite extension of ColorTest inside a Window (#5698)
Current implementation of ColorTest infinitely expand horizontally at
each redraw if included in a Window.

The effect can be see replacing the Panel in the ColorTestApp::update
with a Window:
```
egui::CentralPanel::default().show(ctx, |ui| {
   egui::Window::new("Colors").vscroll(true).show(ctx, |ui| {
   if frame.is_web() {
      ui.label(
         "NOTE: Some old browsers stuck on WebGL1 without sRGB support will not pass the color test.",
      );
      ui.separator();
   }
   egui::ScrollArea::both().auto_shrink(false).show(ui, |ui| {
      self.color_test.ui(ui);
   });
   self.color_test.ui(ui);
});
```

The cause is the is the _pixel_test_strokes_ function that, at each
redraw, tries to expand the target rectangle of 2.0 points in each
direction.
2025-04-08 11:38:13 +02:00
..
benches Optimize editing long text by caching each paragraph (#5411) 2025-04-01 18:55:39 +02:00
data Fix broken images on egui.rs (move from git lfs to normal git) (#5480) 2024-12-16 14:16:54 +01:00
src Avoid infinite extension of ColorTest inside a Window (#5698) 2025-04-08 11:38:13 +02:00
tests/snapshots Add overline option for Table rows (#5637) 2025-04-08 11:36:43 +02:00
Cargo.toml Optimize editing long text by caching each paragraph (#5411) 2025-04-01 18:55:39 +02:00
README.md Move all crates into a `crates` directory (#1940) 2022-08-20 10:41:49 +02:00

README.md

egui demo library

Latest version Documentation unsafe forbidden MIT Apache

This crate contains example code for egui.

The demo library is a separate crate for three reasons: