-
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
Warn when font isn't found and another is chosen #8207
Conversation
…use it's erased by settings updating and I don't want to poke that bear nor store another string copy.
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.
Most of these things are pretty small.
case TerminalControl::NoticeLevel::Debug: | ||
title = RS_(L"NoticeDebug"); //\xebe8 | ||
break; | ||
case TerminalControl::NoticeLevel::Info: | ||
title = RS_(L"NoticeInfo"); // \xe946 | ||
break; | ||
case TerminalControl::NoticeLevel::Warning: | ||
title = RS_(L"NoticeWarning"); //\xe7ba | ||
break; | ||
case TerminalControl::NoticeLevel::Error: | ||
title = RS_(L"NoticeError"); //\xe783 | ||
break; |
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.
What are all of these //\xebe8
for?
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 had this bright idea that I was going to use Segoe icons for a bug shaped icon for debug and an I in a circle info icon for informational. But it didn't work right because the text in the dialog won't font fallback. And in lieu of adding another text field with the font set just right to take only the Segoe icon.... I just left the codepoints here for if I cared enough in the future because it was mildly painful to look them up in the first place.
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.
Yea les keep em
// FindName needs to be called first to actually load the xaml object | ||
auto controlNoticeDialog = FindName(L"ControlNoticeDialog").try_as<WUX::Controls::ContentDialog>(); |
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.
Wait...Really? So you never actually use controlNoticeDialog
? I guess might as well not set it to the variable (or call Title
off of controlNoticeDialog
below).
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.
Well.... the trickery is, as far as I know, that these things are lazy-instantiated. So I believe this is necessary to make XAML load the object before I can do the things below. So yeah, I don't use it. But I had to ask for it to make sure XAML did the needful first on the relevant other variables.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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 don't think I have much that people haven't already mentioned
Debug = 10, | ||
Info = 20, | ||
Warning = 30, | ||
Error = 40, |
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.
Do these values have a particular meaning?
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.
No, I just pulled 4 levels out of my butt and left space for future ones to be put between without renumbering, like BASIC used to do...
If you have another idea... lemme know.
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.
Idk what the deal with those two "changes, but not changes" are, but meh.
.github/actions/spell-check/expect/5757ec679b03a4240130c3c53766c91bbc5cd6a7.txt
Outdated
Show resolved
Hide resolved
🎉 Handy links: |
Display a warning message when the DirectX renderer resolves a font that isn't the one you selected to warn that it couldn't be found.
PR Checklist
Detailed Description of the Pull Request / Additional comments
Also I wrote the dialog event chain out of
TermControl
to be reusable in the future for other messages the control might want to tell a host about and various levels.Validation Steps Performed
settings.json
.