v0.0.50 - CPU values: black text, red only for >=90%; remove all other heat colors and shaded backgrounds
This commit is contained in:
+2
-2
@@ -11,9 +11,9 @@
|
||||
#ifndef SOVEREIGN_BROWSER_VERSION_H
|
||||
#define SOVEREIGN_BROWSER_VERSION_H
|
||||
|
||||
#define SB_VERSION "v0.0.49"
|
||||
#define SB_VERSION "v0.0.50"
|
||||
#define SB_VERSION_MAJOR 0
|
||||
#define SB_VERSION_MINOR 0
|
||||
#define SB_VERSION_PATCH 49
|
||||
#define SB_VERSION_PATCH 50
|
||||
|
||||
#endif /* SOVEREIGN_BROWSER_VERSION_H */
|
||||
|
||||
+4
-6
@@ -75,15 +75,13 @@ code { font-family: var(--font); background: var(--border); padding: 1px 4px; bo
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
/* CPU values: plain text, no shaded background. Color indicates
|
||||
* severity: green < 10%, yellow < 50%, red >= 50%, fg for idle. */
|
||||
/* CPU values: plain text, no shaded background. Red only for >= 90%,
|
||||
* otherwise the default foreground color. */
|
||||
.heat {
|
||||
font-weight: bold;
|
||||
color: var(--fg);
|
||||
}
|
||||
.heat.cool { color: #4caf50; }
|
||||
.heat.warm { color: #ff9800; }
|
||||
.heat.hot { color: #f44336; }
|
||||
.heat.cold { color: var(--fg); }
|
||||
.heat.hot { color: var(--accent); }
|
||||
|
||||
/* Renderer row: clickable to expand hosted tabs. */
|
||||
.renderer-row { cursor: pointer; }
|
||||
|
||||
+6
-8
@@ -63,14 +63,13 @@ function fmtUptime(sec) {
|
||||
}
|
||||
|
||||
function heatClass(pct) {
|
||||
if (pct == null || pct <= 0) return 'cold';
|
||||
if (pct < 10) return 'cool';
|
||||
if (pct < 50) return 'warm';
|
||||
return 'hot';
|
||||
if (pct == null) return '';
|
||||
if (pct >= 90) return 'hot';
|
||||
return '';
|
||||
}
|
||||
|
||||
function heatHtml(pct) {
|
||||
if (pct == null) return '<span class="heat cold">—</span>';
|
||||
if (pct == null) return '<span class="heat">—</span>';
|
||||
return '<span class="heat ' + heatClass(pct) + '">' +
|
||||
pct.toFixed(1) + '</span>';
|
||||
}
|
||||
@@ -144,8 +143,7 @@ function renderProcTable() {
|
||||
var tabsCount = (p.hosted_tabs || []).length;
|
||||
var tabsCell;
|
||||
if (isRenderer) {
|
||||
tabsCell = '<span class="heat ' + (tabsCount ? 'cool' : 'cold') +
|
||||
'">' + tabsCount + '</span>';
|
||||
tabsCell = String(tabsCount);
|
||||
} else {
|
||||
tabsCell = '—';
|
||||
}
|
||||
@@ -272,7 +270,7 @@ function renderTabsTable() {
|
||||
esc(t.title || '(untitled)') + '</span>' +
|
||||
(t.is_internal ? ' (internal)' : '') +
|
||||
'<br><span class="url-sub">' + esc(t.url) + '</span></td>' +
|
||||
'<td>' + (t.is_internal ? '<span class="heat cold">—</span>'
|
||||
'<td>' + (t.is_internal ? '<span class="heat">—</span>'
|
||||
: heatHtml(busy)) + '</td>' +
|
||||
'<td>' + probeField(t, 'fps') + '</td>' +
|
||||
'<td>' + probeField(t, 'timer_count') + '</td>' +
|
||||
|
||||
Reference in New Issue
Block a user