-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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); ```
- Loading branch information
Showing
1 changed file
with
78 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters