Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only add resize radius for interactable areas #577

Merged
merged 1 commit into from
Aug 15, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions egui/src/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -473,13 +473,13 @@ impl Areas {
for layer in self.order.iter().rev() {
if self.is_visible(layer) {
if let Some(state) = self.areas.get(&layer.id) {
let mut rect = Rect::from_min_size(state.pos, state.size);
if state.interactable {
let rect = Rect::from_min_size(state.pos, state.size);
// Allow us to resize by dragging just outside the window:
let rect = rect.expand(resize_interact_radius_side);
if rect.contains(pos) {
return Some(*layer);
}
rect = rect.expand(resize_interact_radius_side);
}
if rect.contains(pos) {
return Some(*layer);
}
}
}
Expand Down