Pass PaintContext to Element::paint
I want to use this on another branch, but it's a sweeping change, so this prepares the ground for it. This can always be reverted if it doesn't work out.
This commit is contained in:
parent
cc23360bab
commit
1b03c5d69c
32 changed files with 223 additions and 80 deletions
|
@ -593,8 +593,8 @@ mod element {
|
|||
},
|
||||
json::{self, ToJson},
|
||||
platform::{CursorStyle, MouseButton},
|
||||
AnyElement, Axis, CursorRegion, Element, LayoutContext, MouseRegion, RectFExt,
|
||||
SceneBuilder, SizeConstraint, Vector2FExt, ViewContext,
|
||||
AnyElement, Axis, CursorRegion, Element, LayoutContext, MouseRegion, PaintContext,
|
||||
RectFExt, SceneBuilder, SizeConstraint, Vector2FExt, ViewContext,
|
||||
};
|
||||
|
||||
use crate::{
|
||||
|
@ -765,7 +765,7 @@ mod element {
|
|||
visible_bounds: RectF,
|
||||
remaining_space: &mut Self::LayoutState,
|
||||
view: &mut Workspace,
|
||||
cx: &mut ViewContext<Workspace>,
|
||||
cx: &mut PaintContext<Workspace>,
|
||||
) -> Self::PaintState {
|
||||
let can_resize = settings::get::<WorkspaceSettings>(cx).active_pane_magnification == 1.;
|
||||
let visible_bounds = bounds.intersection(visible_bounds).unwrap_or_default();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue