1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 22:53:14 -04:00
Files
egui/crates
Emil Ernerfeldt 6b0782c96b Improve Frame API to allow picking color until after adding content (#3889)
Previously the `Frame` API only supported picking colors once, and then
adding widgets.

But what if you want to add widgets first, and THEN pick the colors for
the frame? Now you can!


```rs
let frame = Frame::default().inner_margin(4.0).begin(ui);
{
    frame.content_ui.label("Inside the frame");
    frame.content_ui.label("This too");
}
let response = frame.allocate_space(ui);
if response.hovered() {
    frame.frame.stroke = Stroke::new(2.0, Color32::WHITE);
}
frame.paint(ui);
```
2024-01-25 19:59:12 +01:00
..
2024-01-08 17:41:21 +01:00
2024-01-19 10:14:13 +01:00
2024-01-19 10:14:13 +01:00
2024-01-24 16:40:20 +01:00
2023-04-18 15:52:45 +02:00
2024-01-24 15:45:22 +01:00
2024-01-24 15:47:44 +01:00