Replies: 3 comments 4 replies
-
I have had no luck with the
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Decided to just render the label to the left instead of the right |
Beta Was this translation helpful? Give feedback.
0 replies
-
My naive approach would be something along these lines: export component HoverHint inherits TouchArea {
property <bool> should_show: root.text != "" && root.has-hover;
in-out property <int> delay: 500;
in-out property <string> text;
@children
Rectangle {
height: t.height + 5px;
width: t.width + 25px;
x: root.mouse-x + 15px;
y: root.mouse-y;
border-width: 1px;
border-radius: 2px;
t := Text {
text: root.text;
font-weight: 500;
states [
hidden when !root.should_show : {
color: transparent;
}
visible when root.should_show : {
color: black;
in {
animate color { duration: 0; delay: 500ms; }
}
}
]
}
states [
hidden when !root.should_show : {
background: transparent;
border-color: transparent;
}
visible when root.should_show : {
background: beige;
border-color: self.background.darker(20%);
in {
animate background, border-color { duration: 0; delay: 500ms; }
}
}
]
}
} and then use it like this: HoverHint {
MyButton { ... }
} I hope this actually works, I admit I did not test it :-) |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am working on the following, a hover-hint element I can attach to things
Should I give up on this approach, since it draws beneath anything set after it and instead have a single element that passes callbacks around? Or is there a way to force it to draw over other elements
Beta Was this translation helpful? Give feedback.
All reactions