mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 22:00:03 -04:00
Revert renaming a field in WidgetRect to avoid semver breakage
This commit is contained in:
@@ -201,7 +201,7 @@ pub struct WidgetRect {
|
|||||||
/// Where the widget is.
|
/// Where the widget is.
|
||||||
///
|
///
|
||||||
/// This is after clipping with the parent ui clip rect.
|
/// This is after clipping with the parent ui clip rect.
|
||||||
pub interact_rect: Rect,
|
pub rect: Rect,
|
||||||
|
|
||||||
/// The globally unique widget id.
|
/// The globally unique widget id.
|
||||||
///
|
///
|
||||||
@@ -236,7 +236,7 @@ impl WidgetRects {
|
|||||||
|
|
||||||
/// Insert the given widget rect in the given layer.
|
/// Insert the given widget rect in the given layer.
|
||||||
pub fn insert(&mut self, layer_id: LayerId, widget_rect: WidgetRect) {
|
pub fn insert(&mut self, layer_id: LayerId, widget_rect: WidgetRect) {
|
||||||
if !widget_rect.interact_rect.is_positive() {
|
if !widget_rect.rect.is_positive() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -246,7 +246,7 @@ impl WidgetRects {
|
|||||||
if last.id == widget_rect.id {
|
if last.id == widget_rect.id {
|
||||||
// e.g. calling `response.interact(…)` right after interacting.
|
// e.g. calling `response.interact(…)` right after interacting.
|
||||||
last.sense |= widget_rect.sense;
|
last.sense |= widget_rect.sense;
|
||||||
last.interact_rect = last.interact_rect.union(widget_rect.interact_rect);
|
last.rect = last.rect.union(widget_rect.rect);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1128,7 +1128,7 @@ impl Context {
|
|||||||
layer_id,
|
layer_id,
|
||||||
WidgetRect {
|
WidgetRect {
|
||||||
id,
|
id,
|
||||||
interact_rect,
|
rect: interact_rect,
|
||||||
sense,
|
sense,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@@ -2334,7 +2334,7 @@ impl Context {
|
|||||||
layer_id,
|
layer_id,
|
||||||
WidgetRect {
|
WidgetRect {
|
||||||
id,
|
id,
|
||||||
interact_rect,
|
rect: interact_rect,
|
||||||
sense,
|
sense,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@@ -2352,7 +2352,7 @@ impl Context {
|
|||||||
// which means there are no widgets covering us.
|
// which means there are no widgets covering us.
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if !blocking.interact_rect.contains(pointer_pos) {
|
if !blocking.rect.contains(pointer_pos) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if sense.interactive() && !blocking.sense.interactive() {
|
if sense.interactive() && !blocking.sense.interactive() {
|
||||||
@@ -2374,7 +2374,7 @@ impl Context {
|
|||||||
|
|
||||||
if blocking.sense.interactive() {
|
if blocking.sense.interactive() {
|
||||||
// Another widget is covering us at the pointer position
|
// Another widget is covering us at the pointer position
|
||||||
blocking_widget = Some(blocking.interact_rect);
|
blocking_widget = Some(blocking.rect);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user