mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 22:53:14 -04:00
Bug fix: child painters now inherit color tint (e.g. grayed out)
This commit is contained in:
@@ -63,11 +63,12 @@ impl Painter {
|
||||
/// The clip-rect of the returned `Painter` will be the intersection
|
||||
/// of the given rectangle and the `clip_rect()` of this `Painter`.
|
||||
pub fn sub_region(&self, rect: Rect) -> Self {
|
||||
Self::new(
|
||||
self.ctx.clone(),
|
||||
self.layer_id,
|
||||
rect.intersect(self.clip_rect),
|
||||
)
|
||||
Self {
|
||||
ctx: self.ctx.clone(),
|
||||
layer_id: self.layer_id,
|
||||
clip_rect: rect.intersect(self.clip_rect),
|
||||
fade_to_color: self.fade_to_color,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user