Fine-tune tooltip documentation

This commit is contained in:
Héctor Ramón Jiménez 2025-11-27 04:13:51 +01:00
parent 77708f0574
commit cbc311ed9e
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -1,7 +1,7 @@
//! Tooltips display a hint of information over some element when hovered. //! Tooltips display a hint of information over some element when hovered.
//! //!
//! By default, the tooltip is only displayed after a short duration. (This //! By default, the tooltip is only displayed when hovered for 2 seconds.
//! delay can be customized.) //! This delay can be adjusted with [`Tooltip::delay`].
//! //!
//! # Example //! # Example
//! ```no_run //! ```no_run
@ -123,8 +123,9 @@ where
self self
} }
/// Sets the delay before the [`Tooltip`] is shown. Set to 0 milliseconds /// Sets the delay before the [`Tooltip`] is shown.
/// to be shown immediately. ///
/// Set to [`Duration::ZERO`] to be shown immediately.
pub fn delay(mut self, delay: Duration) -> Self { pub fn delay(mut self, delay: Duration) -> Self {
self.delay = delay; self.delay = delay;
self self