-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Remove the FontSizeChanged event from TermControl #15867
Remove the FontSizeChanged event from TermControl #15867
Conversation
@@ -947,7 +946,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation | |||
} | |||
|
|||
const auto actualNewSize = _actualFont.GetSize(); | |||
_FontSizeChangedHandlers(actualNewSize.width, actualNewSize.height, initialUpdate); | |||
_FontSizeChangedHandlers(*this, *winrt::make_self<FontSizeChangedArgs>(actualNewSize.width, actualNewSize.height)); |
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.
*make_self<T>()
is equivalent to make<T>
when T's default interface is the same as the one you're converting to.
For new code, we should prefer the clearer one :)
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.
I forgot that make works even on a non projected ctor
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.
I forgot that make works even on a non projected ctor
I pushed a merge so that it would kick the CI |
I originally just wanted to close #1104, but then discovered that hey, this event wasn't even used anymore. Excerpts of Teams convo:
pane->Relayout
which I don't even REMEMBERFrom Misc pane refactoring by Rosefield · Pull Request #11373 · microsoft/terminal
So, great. We can kill part of it, and convert the rest to a
TypedEvent
, and get rid ofDECLARE_
/DEFINE_
.ScrollPositionChangedEventArgs
was ALSO apparently already promoted to a typed event, so kill that too.