mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
UWP: Dark theme support
This commit is contained in:
parent
345238a352
commit
7f6f58fac3
12 changed files with 31 additions and 59 deletions
|
@ -283,16 +283,16 @@ void BrowserPage::ClearConsole() {
|
|||
void BrowserPage::OnDevtoolsMessage(DevtoolsMessageLevel level, hstring source,
|
||||
hstring body) {
|
||||
Dispatcher().RunAsync(CoreDispatcherPriority::High, [=] {
|
||||
auto dotColor = UI::Colors::Transparent();
|
||||
auto bgColor = UI::Colors::Transparent();
|
||||
auto glyphColor = UI::Colors::Transparent();
|
||||
auto glyph = L"";
|
||||
if (level == servo::DevtoolsMessageLevel::Error) {
|
||||
dotColor = UI::Colors::Red();
|
||||
bgColor = UI::Colors::LightPink();
|
||||
glyphColor = UI::Colors::Red();
|
||||
glyph = L"\xEA39"; // ErrorBadge
|
||||
} else if (level == servo::DevtoolsMessageLevel::Warn) {
|
||||
dotColor = UI::Colors::Orange();
|
||||
bgColor = UI::Colors::LightYellow();
|
||||
glyphColor = UI::Colors::Orange();
|
||||
glyph = L"\xE7BA"; // Warning
|
||||
}
|
||||
mLogs.Append(make<ConsoleLog>(dotColor, bgColor, body, source));
|
||||
mLogs.Append(make<ConsoleLog>(glyphColor, glyph, body, source));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue