Skip to content

Commit

Permalink
Update resize.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
rustbasic authored May 28, 2024
1 parent 16f6a89 commit 6eecf77
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions crates/egui/src/containers/resize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl State {
#[derive(Clone, Copy, Debug)]
#[must_use = "You should call .show()"]
pub struct Resize {
id: Option<Id>,
pub(crate) id: Option<Id>,
id_source: Option<Id>,

/// If false, we are no enabled
Expand Down Expand Up @@ -374,7 +374,12 @@ impl Resize {
}
}

use epaint::Stroke;
pub fn reset_largest_content_size(ctx: &Context, resize_id: Id) {
if let Some(mut resize_state) = resize::State::load(ctx, resize_id) {
resize_state.largest_content_size = Vec2::ZERO;
resize_state.store(ctx, resize_id);
}
}

pub fn paint_resize_corner(ui: &Ui, response: &Response) {
let stroke = ui.style().interact(response).fg_stroke;
Expand Down

0 comments on commit 6eecf77

Please sign in to comment.