LibWebView: Respect dark mode/light mode TaskManager windows

Suggested-By: Timothy Flynn <trflynn89@pm.me>
This commit is contained in:
Andrew Kaster 2024-04-09 13:28:39 -06:00 committed by Tim Flynn
parent f91d8472ee
commit eefd5edc84

View file

@ -125,6 +125,24 @@ String ProcessManager::generate_html()
<html>
<head>
<style>
@media (prefers-color-scheme: dark) {
/* FIXME: We should be able to remove the HTML style when "color-scheme" is supported */
html {
background-color: rgb(30, 30, 30);
color: white;
}
tr:nth-child(even) {
background: rgb(57, 57, 57);
}
}
@media (prefers-color-scheme: light) {
tr:nth-child(even) {
background: #f7f7f7;
}
}
table {
width: 100%;
border-collapse: collapse;
@ -137,9 +155,6 @@ String ProcessManager::generate_html()
padding: 4px;
border: 1px solid #aaa;
}
tr:nth-child(odd) {
background: #f7f7f7;
}
</style>
</head>
<body>