diff options
author | 2022-02-22 14:10:49 +0700 | |
---|---|---|
committer | 2022-02-23 21:31:54 +0700 | |
commit | 1313c94e3bb206f064462bc521f78dbffc2a6cd6 (patch) | |
tree | a586436e4a1076543a3205ebc895a8463d9f7ffe /native/src/overlay.rs | |
parent | 9fe50801537e8fbfd2914f5139b5a609929e25db (diff) | |
download | iced-1313c94e3bb206f064462bc521f78dbffc2a6cd6.tar.gz iced-1313c94e3bb206f064462bc521f78dbffc2a6cd6.tar.bz2 iced-1313c94e3bb206f064462bc521f78dbffc2a6cd6.zip |
Remove `hash_layout` method from `Widget` trait
Diffstat (limited to 'native/src/overlay.rs')
-rw-r--r-- | native/src/overlay.rs | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/native/src/overlay.rs b/native/src/overlay.rs index d4b641af..124bcac2 100644 --- a/native/src/overlay.rs +++ b/native/src/overlay.rs @@ -10,7 +10,7 @@ use crate::event::{self, Event}; use crate::layout; use crate::mouse; use crate::renderer; -use crate::{Clipboard, Hasher, Layout, Point, Rectangle, Shell, Size}; +use crate::{Clipboard, Layout, Point, Rectangle, Shell, Size}; /// An interactive component that can be displayed on top of other widgets. pub trait Overlay<Message, Renderer> @@ -39,19 +39,6 @@ where cursor_position: Point, ); - /// Computes the _layout_ hash of the [`Overlay`]. - /// - /// The produced hash is used by the runtime to decide if the [`Layout`] - /// needs to be recomputed between frames. Therefore, to ensure maximum - /// efficiency, the hash should only be affected by the properties of the - /// [`Overlay`] that can affect layouting. - /// - /// For example, the [`Text`] widget does not hash its color property, as - /// its value cannot affect the overall [`Layout`] of the user interface. - /// - /// [`Text`]: crate::widget::Text - fn hash_layout(&self, state: &mut Hasher, position: Point); - /// Processes a runtime [`Event`]. /// /// It receives: |