-
-
Notifications
You must be signed in to change notification settings - Fork 71
Refactor text box margins #1056
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
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.
Pull Request Overview
This PR refactors the text box margin functionality by extracting the margin calculations into a dedicated TextBoxMargins class and updating its usage across the code. Key changes include:
- Creation of a new TextBoxMargins class encapsulating left, right, top, and bottom margin logic.
- Refactoring of the TextBox class and related classes (ShapeCollection, IParagraph, and GroupedShapeCollection) to use the new margins class.
- Minor formatting improvements in multiline expressions.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
src/Texts/TextBoxMargins.cs | Introduces a new class to encapsulate margin properties. |
src/Texts/TextBox.cs | Delegates margin handling to TextBoxMargins and adjusts constructor. |
src/Shapes/ShapeCollection.cs, | Updates creation of TextBox instances to pass the new margins instance. |
src/Paragraphs/IParagraph.cs, | Updates TextBox instantiation to use the refactored margins approach. |
src/Groups/GroupedShapeCollection.cs | Updates TextBox instantiation accordingly. |
Comments suppressed due to low confidence (1)
src/Texts/TextBox.cs:381
- [nitpick] Consider consolidating the newWidth calculation onto a single line or adjusting the indentation for the multiline expression to enhance readability.
var newWidth =
|
No description provided.