-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Make GlobalAppSettings a WinRT object #7349
Conversation
b8f476b
to
1a20cb3
Compare
37d6010
to
4b4dd7a
Compare
6051822
to
8396b2d
Compare
4b4dd7a
to
5fe8795
Compare
8396b2d
to
32b9223
Compare
269f005
to
58dcf17
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.
Huh, none of these look blocking to me. Good work!
@@ -27,73 +28,74 @@ namespace TerminalAppLocalTests | |||
class ColorSchemeTests; | |||
}; | |||
|
|||
namespace TerminalApp |
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.
protip: hide whitespace changes
GETSET_PROPERTY(winrt::Microsoft::Terminal::TerminalControl::CopyFormat, CopyFormatting, 0); | ||
GETSET_PROPERTY(bool, WarnAboutLargePaste, true); | ||
GETSET_PROPERTY(bool, WarnAboutMultiLinePaste, true); | ||
GETSET_PROPERTY(winrt::TerminalApp::LaunchPosition, InitialPosition, nullptr, nullptr); |
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'm shocked that nullptr, nullptr
worked here, but happy that it does
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.
clever macro. uses __VA_ARGS__
to splat "everything at the end"
proposedRect.left = gsl::narrow_cast<long>(initialPosition.X); | ||
proposedRect.top = gsl::narrow_cast<long>(initialPosition.Y); | ||
auto initialPos = _logic.GetInitialPosition(proposedRect.left, proposedRect.top); | ||
proposedRect.left = static_cast<long>(initialPos.X); |
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.
of course long
!== int64_t
. That's annoying
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.
only tiny nits!
GETSET_PROPERTY(winrt::Microsoft::Terminal::TerminalControl::CopyFormat, CopyFormatting, 0); | ||
GETSET_PROPERTY(bool, WarnAboutLargePaste, true); | ||
GETSET_PROPERTY(bool, WarnAboutMultiLinePaste, true); | ||
GETSET_PROPERTY(winrt::TerminalApp::LaunchPosition, InitialPosition, nullptr, nullptr); |
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.
clever macro. uses __VA_ARGS__
to splat "everything at the end"
a150e15
to
6d5c578
Compare
c8398bc
to
7cd72aa
Compare
Hello @carlos-zamora! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
🎉 Handy links: |
GlobalAppSettings is now a WinRT object in the TerminalApp project.
References
#7141 - GlobalAppSettings is a settings object
#885 - this new settings object will be moved to a new TerminalSettingsModel project
PR Checklist
Detailed Description of the Pull Request / Additional comments
This one was probably the easiest thus far.
The only weird thing is how we handle InitialPosition. Today, we lose a
little bit of fidelity when we convert from LaunchPosition (int) -->
Point (float) --> RECT (long). The current change converts
LaunchPosition (optional) --> InitialPosition (long) --> RECT
(long).
NOTE: Though I could use LaunchPosition to go directly from TermApp to
AppHost, I decided to introduce InitialPosition because LaunchPosition
will be a part of TerminalSettingsModel soon.
Validation Steps Performed