-
Notifications
You must be signed in to change notification settings - Fork 678
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
Fixes #2489. Create new ScrollBar based on a new Scroll and remove ScrollBarView/ScrollView #3498
base: v2_develop
Are you sure you want to change the base?
Conversation
I would appreciate the |
Ooooh! I'm super excited to review this! Will do asap. |
@tig how about you creating a new |
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.
Really slick!!
I've got a PR with some changes that you might like. I'll submit it vs. making a lot of comments.
Tweaks and suggestions
You mean being able to set the Normal.Background/Forground color for the View itself? Like the colorpicker in |
Yes or for the view passed on the |
@tig did you reorganize by placing the backfields before the properties by hand, or through some automatic system? I normally use R#'s Ctrl+E+C and it's not reformatting that way. |
By hand. It's still broken. |
Greet idea. I'll do it as part of #3376 where I've already completely re-done I also added the abilty to just click on any view in the Scenario and |
I just submitted another PR with quesitons / comments inline. |
Suggestions and questions
IMO, View sub-classes should not have the word "View" in them as a general principle. `
|
I agree, but |
I have to find out why if I move the scroll with the mouse one line the position changes from 0 to 9. However, returning the position to 0 with the mouse and then clicking on the Position button requires the position to reach 10 for the scroll move 1 line. It's strange, I think it should be the same value in both cases, 9 or 10, don't you think? |
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.
Important question in-line.
Also, line 11 of Scroll.cs is dangerous and we either need to seal the class or not access that property in that way in that spot. A derived class that has overridden that member will be set by that line, and the consumer can't tell it not to without completely hiding the member, which has a completely different set of consequences. If the implementation depends on that behavior, then the class needs to be sealed. If the implementation will be ok as long as a derived class doesn't hide the member (which is not our problem), then it should be handled by setting the backing field - not from a virtual member accessor. That's the reason for the warning that's being shown by the analyzer for that line as well as line 23 (the call to |
There's also an important implication of using the Size struct the way it is in View, as a @dodexahedron (tagging so it shows up via an easy search in my queue for later performance pass consideration) |
Not the fault of this PR, but as I said I would do when we got further along, a while back, I'm now giving a closer look to things like I started talking about in my review. That stuff, when traced through just a little, ultimately reveals opportunities in the position and size code to avoid a non-trivial amount of heft from things like copies (both implicit and explicit) and possible boxing, as well as to at least somewhat mitigate potential concurrency problems. Most of that would be via I think it's best for that to be done separately from here, though, because of scope. |
I added highlight effect in the slider. I didn't used the WindowsTerminal_rJyd5R3RZY.mp4PS: |
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.
Took a look at it. Doesn't quite do what you were hoping, but fix is simple. :)
…erformance in the Position property.
Not needed I just override the |
I'm not explaining myself well. If you move the mouse really fast outside of the view that hosts the scroll bar, mouse tracking within the scroll bar stops. |
Ah maybe because the |
Good catch. Man, it would be awesome if we had some automated UI testing to add this sort of thing to. Sucks only having 24 hours in a day, huh? 😅 |
Fixes
ScrollBar
based on a newScroll
and removeScrollBarView/ScrollView
#2489Proposed Changes/Todos
Pull Request checklist:
CTRL-K-D
to automatically reformat your files before committing.dotnet test
before commit///
style comments)