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:
Nathan Sobo 2023-07-25 17:32:31 -06:00
parent cc23360bab
commit 1b03c5d69c
32 changed files with 223 additions and 80 deletions

View file

@ -25,8 +25,8 @@ use gpui::{
keymap_matcher::KeymapContext,
platform::{CursorStyle, MouseButton, NavigationDirection, PromptLevel},
Action, AnyViewHandle, AnyWeakViewHandle, AppContext, AsyncAppContext, Entity, EventContext,
LayoutContext, ModelHandle, MouseRegion, Quad, Task, View, ViewContext, ViewHandle,
WeakViewHandle, WindowContext,
LayoutContext, ModelHandle, MouseRegion, PaintContext, Quad, Task, View, ViewContext,
ViewHandle, WeakViewHandle, WindowContext,
};
use project::{Project, ProjectEntryId, ProjectPath};
use serde::Deserialize;
@ -1896,7 +1896,7 @@ impl<V: View> Element<V> for PaneBackdrop<V> {
visible_bounds: RectF,
_: &mut Self::LayoutState,
view: &mut V,
cx: &mut ViewContext<V>,
cx: &mut PaintContext<V>,
) -> Self::PaintState {
let background = theme::current(cx).editor.background;