fix: remove SVG text, keep only StreamDock native title

This commit is contained in:
2026-06-18 16:06:18 +08:00
parent 4811fef4d2
commit 3313d3ac81
@@ -93,7 +93,7 @@ function makeSvg(fill, label, blink, breathe) {
var anim = ''; var anim = '';
if (blink) anim = '<animate attributeName="opacity" values="1;0.2;1" dur="0.8s" repeatCount="indefinite"/>'; if (blink) anim = '<animate attributeName="opacity" values="1;0.2;1" dur="0.8s" repeatCount="indefinite"/>';
else if (breathe) anim = '<animate attributeName="opacity" values="1;0.4;1" dur="2s" repeatCount="indefinite"/>'; else if (breathe) anim = '<animate attributeName="opacity" values="1;0.4;1" dur="2s" repeatCount="indefinite"/>';
return '<svg width="144" height="144" xmlns="http://www.w3.org/2000/svg"><rect width="144" height="144" rx="20" fill="#0d0d1a"/><circle cx="72" cy="58" r="32" fill="' + fill + '">' + anim + '</circle><text x="72" y="118" font-family="Arial" font-weight="bold" font-size="13" fill="white" text-anchor="middle">' + label + '</text></svg>'; return '<svg width="144" height="144" xmlns="http://www.w3.org/2000/svg"><rect width="144" height="144" rx="20" fill="#0d0d1a"/><circle cx="72" cy="58" r="32" fill="' + fill + '">' + anim + '</circle></svg>';
} }
function setDisplay(ctx, state) { function setDisplay(ctx, state) {
@@ -109,8 +109,7 @@ function setDisplay(ctx, state) {
var anim = ''; var anim = '';
if (d.blink) anim = '<animate attributeName="opacity" values="1;0.2;1" dur="0.8s" repeatCount="indefinite"/>'; if (d.blink) anim = '<animate attributeName="opacity" values="1;0.2;1" dur="0.8s" repeatCount="indefinite"/>';
else if (d.breathe) anim = '<animate attributeName="opacity" values="1;0.4;1" dur="2s" repeatCount="indefinite"/>'; else if (d.breathe) anim = '<animate attributeName="opacity" values="1;0.4;1" dur="2s" repeatCount="indefinite"/>';
svg += '<circle cx="72" cy="58" r="32" fill="' + d.fill + '">' + anim + '</circle>'; svg += '<circle cx="72" cy="58" r="32" fill="' + d.fill + '">' + anim + '</circle></svg>';
svg += '<text x="72" y="118" font-family="Arial" font-weight="bold" font-size="13" fill="white" text-anchor="middle">' + d.title + '</text></svg>';
plugin.setImage(ctx, 'data:image/svg+xml;charset=utf-8,' + svg); plugin.setImage(ctx, 'data:image/svg+xml;charset=utf-8,' + svg);
} }
} }