-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Button hover event #168
Button hover event #168
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion!
What is the use case for this? I think hover events are normally used to change styling, and the button::StyleSheet
should already take care of that.
I am wary of adding this because we do not want users to rely on on_hover
to change layout either, as I feel it would be quite unintuitive. A button should not produce any effects until it is pressed.
I want to display the detailed information of the selected list item in another view. I understand that this usage is not intended for consumers who use touch devices. Also, I apologize for the strange English. |
Yes, I think your use case is completely valid. However, I do not believe a In my opinion, a better alternative would be a new For the GitHub example you posted, a |
I think I could understand your design philosophy. As you say, I still don't have enough time to understand the source code of iced. I will try to create a simple custom widget that supports hover event. |
I solved this by making a custom container widget that handles hover events (and might handle others in the future): Nicely composable :) |
Add a hover event to the button.
Hover events are called continuously when the mouse cursor moves,
but that is the same for other GUI frameworks.