Skip to content

Commit

Permalink
fix doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Jan 25, 2024
1 parent 5794dcc commit acb5208
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/egui/src/containers/frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ use epaint::*;
///
/// ```
/// # egui::__run_test_ui(|ui| {
/// let frame = Frame::default().inner_margin(4.0).begin(ui);
/// let frame = egui::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.frame.fill = egui::Color32::RED;
/// }
/// frame.paint(ui);
/// # });
/// ```
///
/// Note that you cannot change the margins after calling `begin`.
/// ```
#[derive(Clone, Copy, Debug, Default, PartialEq)]
#[must_use = "You should call .show()"]
pub struct Frame {
Expand Down

0 comments on commit acb5208

Please sign in to comment.