-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add HighlightOnMouseEnter feature. #31
Add HighlightOnMouseEnter feature. #31
Conversation
Ha! Neat. When I saw your suggestion I started refactoring my system to be more flexible. Before i saw this I finished it and pushed it. Check it out! I didn't implement Hover, which is what I call what you show here. |
So you don't want any of this, right? |
Based on what I just pushed, I think there's a cleaner way to implement this hover effect. Why don't you look at my latest push and see if you can implement hover? |
If you already have an idea of how to do that, I think it's better to be you do that. Remember that the |
Take a look now. Note both Button & Border... |
The original border style isn't restore after the click even another border view is selected. In the video I changed the border to double and when the mouse is hover it show the border as double but when the mouse is outside the border is showing as single instead of double. WindowsTerminal_o0NPXdQxAk.mp4 |
Good catch. I'm not convinced changing border style is the right effect anyway. I designed the extensibility in the api to enable a view to do any number of things and implemented Border to change style just to demonstrate the API had the right flexibility. With TrueColor we can do really subtle but cool things with the colors. I'd like to have a Color.MakeBright() api |
Maybe only changing the border color is more appropriated than change the border style. |
Can I change my PR to present a suggestion changing for this? |
That's what I meant. |
I also fix a bug calling wrong method |
I may suggest for the |
I'm seeing a behavior where handling both |
Not a bad idea, but I'd rather investigate using "Color.MakeBright()" to avoid having to add more ColorScheme complexity. Just using DarkGrey means that I'd Focus already uses it, there'll be no effect. |
Right, but for some situations we can use the released effect instead of pressed. See my comment #31 (comment) |
Ok but I understand you have to call |
@tig I did changes that do the |
The problem was the |
See it working. WindowsTerminal_RAKjp3TVxU.mp4 |
This breaks the continuous press mode somehow. Don't worry about it though. I want to merge gui-cs#3770 without "Hover" support because it's a nice-to-have that we can implement in a separate PR. So I'll be taking the changes you made here that are good fixes and not taking the hover stuff. |
I don't like the behavior where pressing the mouse on the WindowsTerminal_zBgpiakp49.mp4With your decision of not taking the hover stuff the If you think you still want this PR I will fix the error, otherwise is frustrating spend time for nothing. |
Ok I now see it was already merge. Can I submit a PR for this in the v2_develop? If yes I have to enable the Hover enum. What to do about that? |
Closing this because isn't more valid for this branch. |
Yeah, new Issue against v2_develop. Note, I think the behavior you are noting is due to I do not want to fix this in a piecemeal way. I want to see if we can fix it at the core API level. I'm ok with leaving it partially broken until we come up with a great design that fundamentally fixes the mouse API such that a view can easily distinguish between when the mouse button was first pushed and when it's just remained pushed. |
I hope you like this.