-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Some misc changes needed for MenuBar implementation. #109555
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
Conversation
ac5f17c to
7fbb076
Compare
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.
This is odd. Why does OutlinedBorder need special casing? Is the side just dropped on the floor if shape is not an OutlineBorder?
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.
This is because ShapeBorder doesn't have a BorderSide. Really, we should probably move the side up to ShapeBorder and just eliminate OutlinedBorder. The problem with that is that Border (a ShapeBorder that isn't an OutlinedBorder) wants four sides, not just one.
The reason I made this change is that I wanted to allow the shape of a menu to be a ShapeBorder, not just OutlinedBorder, but buttons weren't allowed to use ShapeBorder because of this code here, and it just seemed like people would look at that and go "Why can I give a shape border to a menu but not a menu button?". It also seems like in the limit that non-OutlinedBorder borders will just become second class citizens, and not be usable anywhere.
One thing I should probably be doing here was also checking to see if the shape is a Border or BorderDirectional, and applying the resolvedSide to all four sides.
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.
Actually, when I look at supporting Border and BorderDirectional, it doesn't really make sense, because basically all they are is a way to specify different border sides for each side, and if you specified one, and then the button's side overwrites them all, then it isn't much use, you might as well use a RoundedRectangleBorder instead. So for Border and BorderDirectional, I say yes, the side just gets dropped on the floor.
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.
OK, I'm just going to revert this. It's too weird.
It means that people will wonder about why menu panels can use a Border, but menu buttons cannot, but that's not as weird as this was getting.
9c602ca to
f81d9ca
Compare
f81d9ca to
9b4f421
Compare
goderbauer
left a comment
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.
LGTM
Description
These are some collected miscellaneous changes to other classes, either just things I noticed while working on it, or some small changes that made the implementation easier.
Related Issues
Tests