Skip to content
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

Renames Frame->Adornment; changes Frame to have a Border subclass #3158

Merged
merged 34 commits into from
Jan 14, 2024

Conversation

tig
Copy link
Collaborator

@tig tig commented Jan 11, 2024

See this discussion: #2994 (comment)

  • Create Margin subclass of Frame
  • Create Border subclass of Frame
  • Create Padding subclass of Frame
  • Improve robustness of Adornment creation
  • Border line style inherits from SuperView (if not set explicitly).
  • Update/tweak Frames scenario
  • Frame->Adornment
  • Frames scenario etc... rename
  • More/better Adornment unit tests

@tig
Copy link
Collaborator Author

tig commented Jan 11, 2024

@BDisp take a look! Just a WIP, but...

@@ -191,15 +191,15 @@ void ThicknessChangedHandler (object sender, EventArgs e)
Margin.ThicknessChanged -= ThicknessChangedHandler;
Margin.Dispose ();
}
Margin = new Frame () { Id = "Margin", Thickness = new Thickness (0) };
Margin = new Frame () { Thickness = new Thickness (0) };
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the future if Margin has a different behavior than Frame then you will to sub-class it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yessir.

I already have one difference: Margin uses SuperView color scheme. Border and padding uses View.

@tig
Copy link
Collaborator Author

tig commented Jan 12, 2024

I started in on adding subviews to border. It's complicated so I'm not going to do it in this pr. I'll neaten this one up a bit more and merge it and do another for that.

@BDisp
Copy link
Collaborator

BDisp commented Jan 12, 2024

I started in on adding subviews to border. It's complicated so I'm not going to do it in this pr. I'll neaten this one up a bit more and merge it and do another for that.

Ok, I also trying to use the Padding of the TabView to handle the tan rows and it isn't really easy because all the login for handles with views and sub-views are in View class itself. But I'll continue trying.
Why not change the Frame class name to Adornment. The sub-views that are added to them are still View sub-classes. Thus will not make confusing with the Rect Frame.

@tig
Copy link
Collaborator Author

tig commented Jan 12, 2024

On the padding thing: it'd be great if you opened an Issue on that. I'd love to dig into it with you with focus (and a simple example, not TabView).

On name: I think you know I've been wishy-washy on Frame vs Adornment as the name. Your comment is helpful. I'll strongly consider it!

@BDisp
Copy link
Collaborator

BDisp commented Jan 12, 2024

On the padding thing: it'd be great if you opened an Issue on that. I'd love to dig into it with you with focus (and a simple example, not TabView).

I was trying in this PR #2980 but didn't commit/push nothing addressed with Padding. So, you don't want I continue on here?

On name: I think you know I've been wishy-washy on Frame vs Adornment as the name. Your comment is helpful. I'll strongly consider it!

Ok at least I did you reflect about it 😃

@tig
Copy link
Collaborator Author

tig commented Jan 12, 2024

On the padding thing: it'd be great if you opened an Issue on that. I'd love to dig into it with you with focus (and a simple example, not TabView).

I was trying in this PR #2980 but didn't commit/push nothing addressed with Padding. So, you don't want I continue on here?

When working on architecture, I'm a fan of starting with just unit tests and a very simple Scenario vs. a major change like what needs to happen to TabView. TabView is a pretty complex beast, so yes.

@tig tig changed the title Changes Frame to have a Border subclass Renames Frame->Adornment; changes Frame to have a Border subclass Jan 13, 2024
@BDisp
Copy link
Collaborator

BDisp commented Jan 13, 2024

On name: I think you know I've been wishy-washy on Frame vs Adornment as the name. Your comment is helpful. I'll strongly consider it!

Ok at least I did you reflect about it 😃

I really appreciated for you have reconsider to change from Frame to Adornment. Thanks.

@BDisp
Copy link
Collaborator

BDisp commented Jan 13, 2024

@tig how about rename the Bounds to ContentArea as it's used on some of the View methods?

@tig
Copy link
Collaborator Author

tig commented Jan 14, 2024

@tig how about rename the Bounds to ContentArea as it's used on some of the View methods?

@tig tig merged commit 7fe95cb into gui-cs:v2_develop Jan 14, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants