summaryrefslogtreecommitdiffstats
path: root/native/src/layout.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2021-02-24 01:42:08 +0100
committerLibravatar GitHub <noreply@github.com>2021-02-24 01:42:08 +0100
commita5fddf9ee648927b294ef34e8819855d5e117b26 (patch)
tree96f5454cdb07249beefdb0b804de3b10f5ff6cb6 /native/src/layout.rs
parent6759a5c56fc53286d77698ac9a86812b6d7b03ff (diff)
parent2736e4ca35f17a92768f0be682acf6da3b574cb6 (diff)
downloadiced-a5fddf9ee648927b294ef34e8819855d5e117b26.tar.gz
iced-a5fddf9ee648927b294ef34e8819855d5e117b26.tar.bz2
iced-a5fddf9ee648927b294ef34e8819855d5e117b26.zip
Merge pull request #465 from yusdacra/tooltip-widget
Tooltip widget
Diffstat (limited to '')
-rw-r--r--native/src/layout.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/native/src/layout.rs b/native/src/layout.rs
index 6d144902..b4b4a021 100644
--- a/native/src/layout.rs
+++ b/native/src/layout.rs
@@ -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 {