-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
Apply Enum Mappings to most enum settings #8090
Apply Enum Mappings to most enum settings #8090
Conversation
auto entry = winrt::make<EnumEntry>(enumName, winrt::box_value<TextAntialiasingMode>(value)); | ||
_AntialiasingModes.Append(entry); | ||
|
||
// Initialize the selected item to be our current setting | ||
if (value == Profile().AntialiasingMode()) | ||
{ | ||
AntialiasingModeButtons().SelectedItem(entry); | ||
} | ||
} | ||
|
||
auto closeOnExitModesMap = EnumMappings::CloseOnExit(); | ||
for (auto [key, value] : closeOnExitModesMap) | ||
{ | ||
auto enumName = LocalizedNameForEnumName(L"Profile_CloseOnExit", key, L"Content"); | ||
auto entry = winrt::make<EnumEntry>(enumName, winrt::box_value<CloseOnExitMode>(value)); | ||
_CloseOnExitModes.Append(entry); | ||
|
||
// Initialize the selected item to be our current setting | ||
if (value == Profile().CloseOnExit()) | ||
{ | ||
CloseOnExitModeButtons().SelectedItem(entry); | ||
} | ||
} | ||
|
||
auto bellStyleMap = EnumMappings::BellStyle(); | ||
for (auto [key, value] : bellStyleMap) | ||
{ | ||
auto enumName = LocalizedNameForEnumName(L"Profile_BellStyle", key, L"Content"); | ||
auto entry = winrt::make<EnumEntry>(enumName, winrt::box_value<BellStyle>(value)); | ||
_BellStyles.Append(entry); | ||
|
||
// Initialize the selected item to be our current setting | ||
if (value == Profile().BellStyle()) | ||
{ |
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 mean, this seems insane.
@@ -251,7 +251,8 @@ | |||
<value>Launch size</value> | |||
</data> | |||
<data name="Globals_LaunchSize.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve"> | |||
<value>Defines whether the terminal will launch in a window, maximized, or full screen.</value> | |||
<value>Defines whether the terminal will launch as maximized, full screen, or in a window. Setting this to "Focus" is equivalent to launching the terminal in the "Default" mode, but with the focus mode enabled. Similar, setting this to "MaximizedFocus" will result in launching the terminal in a maximized window with the focus mode enabled.</value> |
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.
THE LOC FREEZE WAS THREE WEEKS AGO COME ON LOL
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.
also, the wording is wrong. Maximized Focus
should be two words.
I don't think we're doing it right if we just copy the entire json schema field description into a freakin' tooltip, but it's what we've got today.
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.
My bad. #7873 went in and I had no clue. I'll pull all the resw changes into a separate PR to get enough time for localization.
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.
Moved all the localization stuff over to #8116. Removing this stuff from this PR.
I'm actually going to close this PR.
|
Summary of the Pull Request
Builds off of #8086 to introduce enum mappings for most of the remaining enum settings. This excludes the following two settings:
This also removes "Globals" files, a relic from the hackathon. We decided to split this up into all the other pages, and forgot to remove this at some point.
References
#1564 - Settings UI Epic
Validation Steps Performed
These become validated when we load the page with setting on it. Since there's a known issue right now that we can't load every available page (yet), I've only been able to validate that this works on the loadable pages.
If a setting was added, but we didn't update the resw properly, we get an error at runtime. So this helps a ton with debugging!