WIP
This commit is contained in:
@@ -7,7 +7,7 @@ use crate::{
|
||||
geometry::{rect::RectF, vector::Vector2F},
|
||||
json::json,
|
||||
Action, Axis, ElementStateHandle, LayoutContext, PaintContext, SceneBuilder, SizeConstraint,
|
||||
Task, View, ViewContext,
|
||||
Task, ViewContext,
|
||||
};
|
||||
use schemars::JsonSchema;
|
||||
use serde::Deserialize;
|
||||
@@ -21,7 +21,7 @@ use util::ResultExt;
|
||||
|
||||
const DEBOUNCE_TIMEOUT: Duration = Duration::from_millis(500);
|
||||
|
||||
pub struct Tooltip<V: View> {
|
||||
pub struct Tooltip<V> {
|
||||
child: AnyElement<V>,
|
||||
tooltip: Option<AnyElement<V>>,
|
||||
_state: ElementStateHandle<Rc<TooltipState>>,
|
||||
@@ -51,8 +51,8 @@ pub struct KeystrokeStyle {
|
||||
text: TextStyle,
|
||||
}
|
||||
|
||||
impl<V: View> Tooltip<V> {
|
||||
pub fn new<Tag: 'static, T: View>(
|
||||
impl<V: 'static> Tooltip<V> {
|
||||
pub fn new<Tag: 'static, T: 'static>(
|
||||
id: usize,
|
||||
text: String,
|
||||
action: Option<Box<dyn Action>>,
|
||||
@@ -166,7 +166,7 @@ impl<V: View> Tooltip<V> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<V: View> Element<V> for Tooltip<V> {
|
||||
impl<V: 'static> Element<V> for Tooltip<V> {
|
||||
type LayoutState = ();
|
||||
type PaintState = ();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user