summaryrefslogtreecommitdiffstats
path: root/widget/src/tooltip.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-16 05:33:47 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-16 05:33:47 +0100
commitc22269bff3085012d326a0df77bf27ad5bcb41b7 (patch)
tree1083f21d012ab2bac88fb51537d4dc431bc7f170 /widget/src/tooltip.rs
parent0524e9b4571d264018656418f02a1f9e27e268d7 (diff)
downloadiced-c22269bff3085012d326a0df77bf27ad5bcb41b7.tar.gz
iced-c22269bff3085012d326a0df77bf27ad5bcb41b7.tar.bz2
iced-c22269bff3085012d326a0df77bf27ad5bcb41b7.zip
Introduce `Program` API
Diffstat (limited to 'widget/src/tooltip.rs')
-rw-r--r--widget/src/tooltip.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/widget/src/tooltip.rs b/widget/src/tooltip.rs
index 8e11ca98..32c962fc 100644
--- a/widget/src/tooltip.rs
+++ b/widget/src/tooltip.rs
@@ -273,11 +273,10 @@ where
}
/// The position of the tooltip. Defaults to following the cursor.
-#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
pub enum Position {
- /// The tooltip will follow the cursor.
- FollowCursor,
/// The tooltip will appear on the top of the widget.
+ #[default]
Top,
/// The tooltip will appear on the bottom of the widget.
Bottom,
@@ -285,6 +284,8 @@ pub enum Position {
Left,
/// The tooltip will appear on the right of the widget.
Right,
+ /// The tooltip will follow the cursor.
+ FollowCursor,
}
#[derive(Debug, Clone, Copy, PartialEq, Default)]