diff options
| author | 2020-06-05 14:00:31 +0200 | |
|---|---|---|
| committer | 2020-06-05 14:00:31 +0200 | |
| commit | e8e656b3300093e384771a6083e25e9395bbeb50 (patch) | |
| tree | 47da6f15538a9a5c1276299b743058cd464ede06 /native/src/layout | |
| parent | 4e1e0e0890b83fb1c4c4406791e3aa63bba58a93 (diff) | |
| download | iced-e8e656b3300093e384771a6083e25e9395bbeb50.tar.gz iced-e8e656b3300093e384771a6083e25e9395bbeb50.tar.bz2 iced-e8e656b3300093e384771a6083e25e9395bbeb50.zip | |
Implement `Layout::position`
Diffstat (limited to '')
| -rw-r--r-- | native/src/layout.rs | 9 | 
1 files changed, 8 insertions, 1 deletions
| diff --git a/native/src/layout.rs b/native/src/layout.rs index 4a3ab94a..93d95e17 100644 --- a/native/src/layout.rs +++ b/native/src/layout.rs @@ -34,7 +34,14 @@ impl<'a> Layout<'a> {          }      } -    /// Gets the bounds of the [`Layout`]. +    /// Returns the position of the [`Layout`]. +    /// +    /// [`Layout`]: struct.Layout.html +    pub fn position(&self) -> Point { +        self.position +    } + +    /// Returns the bounds of the [`Layout`].      ///      /// The returned [`Rectangle`] describes the position and size of a      /// [`Node`]. | 
