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
@@ -13,8 +13,8 @@ use gpui::{
geometry::{rect::RectF, vector::vec2f, PathBuilder},
json::{self, ToJson},
platform::{CursorStyle, MouseButton},
AppContext, Entity, ImageData, ModelHandle, PaintContext, Subscription, View, ViewContext,
ViewHandle, WeakViewHandle,
AppContext, Entity, ImageData, ModelHandle, Subscription, View, ViewContext, ViewHandle,
WeakViewHandle,
};
use picker::PickerEvent;
use project::{Project, RepositoryEntry};
@@ -1176,7 +1176,7 @@ impl Element<CollabTitlebarItem> for AvatarRibbon {
_: RectF,
_: &mut Self::LayoutState,
_: &mut CollabTitlebarItem,
cx: &mut PaintContext<CollabTitlebarItem>,
cx: &mut ViewContext<CollabTitlebarItem>,
) -> Self::PaintState {
let mut path = PathBuilder::new();
path.reset(bounds.lower_left());
+2 -2
View File
@@ -7,7 +7,7 @@ use gpui::{
},
json::ToJson,
serde_json::{self, json},
AnyElement, Axis, Element, PaintContext, View, ViewContext,
AnyElement, Axis, Element, View, ViewContext,
};
pub(crate) struct FacePile<V: View> {
@@ -57,7 +57,7 @@ impl<V: View> Element<V> for FacePile<V> {
visible_bounds: RectF,
_layout: &mut Self::LayoutState,
view: &mut V,
cx: &mut PaintContext<V>,
cx: &mut ViewContext<V>,
) -> Self::PaintState {
let visible_bounds = bounds.intersection(visible_bounds).unwrap_or_default();