Eliminate PaintContext

This commit is contained in:
Nathan Sobo
2023-09-11 09:00:59 -06:00
parent a24d94cfda
commit e0fdc7d0aa
49 changed files with 156 additions and 269 deletions
+3 -3
View File
@@ -25,8 +25,8 @@ use gpui::{
keymap_matcher::KeymapContext,
platform::{CursorStyle, MouseButton, NavigationDirection, PromptLevel},
Action, AnyViewHandle, AnyWeakViewHandle, AppContext, AsyncAppContext, Entity, EventContext,
ModelHandle, MouseRegion, PaintContext, Quad, Task, View, ViewContext, ViewHandle,
WeakViewHandle, WindowContext,
ModelHandle, MouseRegion, Quad, Task, View, ViewContext, ViewHandle, WeakViewHandle,
WindowContext,
};
use project::{Project, ProjectEntryId, ProjectPath};
use serde::Deserialize;
@@ -2011,7 +2011,7 @@ impl<V: 'static> Element<V> for PaneBackdrop<V> {
visible_bounds: RectF,
_: &mut Self::LayoutState,
view: &mut V,
cx: &mut PaintContext<V>,
cx: &mut ViewContext<V>,
) -> Self::PaintState {
let background = theme::current(cx).editor.background;
+2 -2
View File
@@ -594,7 +594,7 @@ mod element {
json::{self, ToJson},
platform::{CursorStyle, MouseButton},
scene::MouseDrag,
AnyElement, Axis, CursorRegion, Element, EventContext, MouseRegion, PaintContext, RectFExt,
AnyElement, Axis, CursorRegion, Element, EventContext, MouseRegion, RectFExt,
SizeConstraint, Vector2FExt, ViewContext,
};
@@ -855,7 +855,7 @@ mod element {
visible_bounds: RectF,
remaining_space: &mut Self::LayoutState,
view: &mut Workspace,
cx: &mut PaintContext<Workspace>,
cx: &mut ViewContext<Workspace>,
) -> Self::PaintState {
let can_resize = settings::get::<WorkspaceSettings>(cx).active_pane_magnification == 1.;
let visible_bounds = bounds.intersection(visible_bounds).unwrap_or_default();
+3 -3
View File
@@ -8,8 +8,8 @@ use gpui::{
vector::{vec2f, Vector2F},
},
json::{json, ToJson},
AnyElement, AnyViewHandle, Entity, PaintContext, SizeConstraint, Subscription, View,
ViewContext, ViewHandle, WindowContext,
AnyElement, AnyViewHandle, Entity, SizeConstraint, Subscription, View, ViewContext, ViewHandle,
WindowContext,
};
pub trait StatusItemView: View {
@@ -230,7 +230,7 @@ impl Element<StatusBar> for StatusBarElement {
visible_bounds: RectF,
_: &mut Self::LayoutState,
view: &mut StatusBar,
cx: &mut PaintContext<StatusBar>,
cx: &mut ViewContext<StatusBar>,
) -> Self::PaintState {
let origin_y = bounds.upper_right().y();
let visible_bounds = bounds.intersection(visible_bounds).unwrap_or_default();