Checkpoint
This commit is contained in:
parent
0609628645
commit
68bc22f9cd
6 changed files with 18 additions and 18 deletions
|
@ -2,8 +2,8 @@ use crate::{
|
||||||
AnyElement, BorrowWindow, Bounds, Element, ElementFocus, ElementId, ElementInteraction,
|
AnyElement, BorrowWindow, Bounds, Element, ElementFocus, ElementId, ElementInteraction,
|
||||||
FocusDisabled, FocusEnabled, FocusHandle, FocusListeners, Focusable, GlobalElementId,
|
FocusDisabled, FocusEnabled, FocusHandle, FocusListeners, Focusable, GlobalElementId,
|
||||||
GroupBounds, InteractiveElementState, IntoAnyElement, LayoutId, Overflow, ParentElement,
|
GroupBounds, InteractiveElementState, IntoAnyElement, LayoutId, Overflow, ParentElement,
|
||||||
Pixels, Point, SharedString, StatefulInteractivity, StatefullyInteractive,
|
Pixels, Point, SharedString, StatefulInteractive, StatefulInteractivity, StatelessInteraction,
|
||||||
StatelessInteraction, StatelesslyInteractive, Style, StyleRefinement, Styled, ViewContext,
|
StatelessInteractive, Style, StyleRefinement, Styled, ViewContext,
|
||||||
};
|
};
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use refineable::Refineable;
|
use refineable::Refineable;
|
||||||
|
@ -320,7 +320,7 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<V, I, F> StatelesslyInteractive for Div<V, I, F>
|
impl<V, I, F> StatelessInteractive for Div<V, I, F>
|
||||||
where
|
where
|
||||||
I: ElementInteraction<V>,
|
I: ElementInteraction<V>,
|
||||||
F: ElementFocus<V>,
|
F: ElementFocus<V>,
|
||||||
|
@ -331,7 +331,7 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<V, F> StatefullyInteractive for Div<V, StatefulInteractivity<V>, F>
|
impl<V, F> StatefulInteractive for Div<V, StatefulInteractivity<V>, F>
|
||||||
where
|
where
|
||||||
F: ElementFocus<V>,
|
F: ElementFocus<V>,
|
||||||
V: 'static + Send + Sync,
|
V: 'static + Send + Sync,
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
use crate::{
|
use crate::{
|
||||||
div, AnyElement, BorrowWindow, Bounds, Div, Element, ElementFocus, ElementId,
|
div, AnyElement, BorrowWindow, Bounds, Div, Element, ElementFocus, ElementId,
|
||||||
ElementInteraction, FocusDisabled, FocusEnabled, FocusListeners, Focusable,
|
ElementInteraction, FocusDisabled, FocusEnabled, FocusListeners, Focusable,
|
||||||
InteractiveElementState, IntoAnyElement, LayoutId, Pixels, SharedString, StatefulInteractivity,
|
InteractiveElementState, IntoAnyElement, LayoutId, Pixels, SharedString, StatefulInteractive,
|
||||||
StatefullyInteractive, StatelessInteraction, StatelesslyInteractive, StyleRefinement, Styled,
|
StatefulInteractivity, StatelessInteraction, StatelessInteractive, StyleRefinement, Styled,
|
||||||
ViewContext,
|
ViewContext,
|
||||||
};
|
};
|
||||||
use futures::FutureExt;
|
use futures::FutureExt;
|
||||||
|
@ -151,7 +151,7 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<V, I, F> StatelesslyInteractive for Img<V, I, F>
|
impl<V, I, F> StatelessInteractive for Img<V, I, F>
|
||||||
where
|
where
|
||||||
V: 'static + Send + Sync,
|
V: 'static + Send + Sync,
|
||||||
I: ElementInteraction<V>,
|
I: ElementInteraction<V>,
|
||||||
|
@ -162,7 +162,7 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<V, F> StatefullyInteractive for Img<V, StatefulInteractivity<V>, F>
|
impl<V, F> StatefulInteractive for Img<V, StatefulInteractivity<V>, F>
|
||||||
where
|
where
|
||||||
V: 'static + Send + Sync,
|
V: 'static + Send + Sync,
|
||||||
F: ElementFocus<V>,
|
F: ElementFocus<V>,
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
use crate::{
|
use crate::{
|
||||||
div, AnyElement, Bounds, Div, Element, ElementFocus, ElementId, ElementInteraction,
|
div, AnyElement, Bounds, Div, Element, ElementFocus, ElementId, ElementInteraction,
|
||||||
FocusDisabled, FocusEnabled, FocusListeners, Focusable, InteractiveElementState,
|
FocusDisabled, FocusEnabled, FocusListeners, Focusable, InteractiveElementState,
|
||||||
IntoAnyElement, LayoutId, Pixels, SharedString, StatefulInteractivity, StatefullyInteractive,
|
IntoAnyElement, LayoutId, Pixels, SharedString, StatefulInteractive, StatefulInteractivity,
|
||||||
StatelessInteraction, StatelesslyInteractive, StyleRefinement, Styled, ViewContext,
|
StatelessInteraction, StatelessInteractive, StyleRefinement, Styled, ViewContext,
|
||||||
};
|
};
|
||||||
use util::ResultExt;
|
use util::ResultExt;
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<V, I, F> StatelesslyInteractive for Svg<V, I, F>
|
impl<V, I, F> StatelessInteractive for Svg<V, I, F>
|
||||||
where
|
where
|
||||||
V: 'static + Send + Sync,
|
V: 'static + Send + Sync,
|
||||||
I: ElementInteraction<V>,
|
I: ElementInteraction<V>,
|
||||||
|
@ -135,7 +135,7 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<V, F> StatefullyInteractive for Svg<V, StatefulInteractivity<V>, F>
|
impl<V, F> StatefulInteractive for Svg<V, StatefulInteractivity<V>, F>
|
||||||
where
|
where
|
||||||
V: 'static + Send + Sync,
|
V: 'static + Send + Sync,
|
||||||
F: ElementFocus<V>,
|
F: ElementFocus<V>,
|
||||||
|
|
|
@ -9,7 +9,7 @@ use std::{
|
||||||
sync::Arc,
|
sync::Arc,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub trait StatelesslyInteractive: Element {
|
pub trait StatelessInteractive: Element {
|
||||||
fn stateless_interactivity(&mut self) -> &mut StatelessInteraction<Self::ViewState>;
|
fn stateless_interactivity(&mut self) -> &mut StatelessInteraction<Self::ViewState>;
|
||||||
|
|
||||||
fn on_mouse_down(
|
fn on_mouse_down(
|
||||||
|
@ -239,7 +239,7 @@ pub trait StatelesslyInteractive: Element {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait StatefullyInteractive: StatelesslyInteractive {
|
pub trait StatefulInteractive: StatelessInteractive {
|
||||||
fn stateful_interactivity(&mut self) -> &mut StatefulInteractivity<Self::ViewState>;
|
fn stateful_interactivity(&mut self) -> &mut StatefulInteractivity<Self::ViewState>;
|
||||||
|
|
||||||
fn active(mut self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Self
|
fn active(mut self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Self
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use crate::themes::rose_pine;
|
use crate::themes::rose_pine;
|
||||||
use gpui3::{
|
use gpui3::{
|
||||||
div, view, Action, Context, Focusable, KeyBinding, ParentElement, StatelesslyInteractive,
|
div, view, Action, Context, Focusable, KeyBinding, ParentElement, StatelessInteractive, Styled,
|
||||||
Styled, View, WindowContext,
|
View, WindowContext,
|
||||||
};
|
};
|
||||||
use std::any::Any;
|
use std::any::Any;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
pub use gpui3::{
|
pub use gpui3::{
|
||||||
div, Element, IntoAnyElement, ParentElement, ScrollState, SharedString, StatefullyInteractive,
|
div, Element, IntoAnyElement, ParentElement, ScrollState, SharedString, StatefulInteractive,
|
||||||
StatelesslyInteractive, Styled, ViewContext, WindowContext,
|
StatelessInteractive, Styled, ViewContext, WindowContext,
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::settings::user_settings;
|
use crate::settings::user_settings;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue