Change Tooltip to support Text only for now

This commit is contained in:
Héctor Ramón Jiménez 2021-02-23 03:09:16 +01:00
parent a19f89d3a6
commit 81c75c1524
15 changed files with 171 additions and 302 deletions

View file

@ -19,11 +19,14 @@ pub struct Layout<'a> {
}
impl<'a> Layout<'a> {
pub(crate) fn new(node: &'a Node) -> Self {
/// Creates a new [`Layout`] for the given [`Node`] at the origin.
pub fn new(node: &'a Node) -> Self {
Self::with_offset(Vector::new(0.0, 0.0), node)
}
pub(crate) fn with_offset(offset: Vector, node: &'a Node) -> Self {
/// Creates a new [`Layout`] for the given [`Node`] with the provided offset
/// from the origin.
pub fn with_offset(offset: Vector, node: &'a Node) -> Self {
let bounds = node.bounds();
Self {