fix: accent color for badge
This commit is contained in:
parent
ba98e8dcc8
commit
37cd4e9886
3 changed files with 3 additions and 6 deletions
|
@ -195,7 +195,7 @@ export const TrayColorTypeSelect: SettingsComponent = ({ settings }) => {
|
|||
</div>
|
||||
|
||||
<Select
|
||||
placeholder="Auto"
|
||||
placeholder="Default"
|
||||
options={[
|
||||
{ label: "Default", value: "default", default: true },
|
||||
{ label: "System Accent", value: "system" },
|
||||
|
|
|
@ -70,9 +70,7 @@ VesktopNative.tray.createIconRequest(async (iconName: string, svgIcon: string =
|
|||
});
|
||||
|
||||
VesktopNative.tray.addBadgeToIcon(async (iconDataURL: string, badgeDataSVG: string) => {
|
||||
const fillColor = VesktopNative.settings.get().trayAutoFill ?? "white";
|
||||
badgeDataSVG = changeColorsInSvg(badgeDataSVG, "#F35959");
|
||||
if (fillColor !== "auto") badgeDataSVG = badgeDataSVG.replace(/white/gim, fillColor);
|
||||
badgeDataSVG = changeColorsInSvg(badgeDataSVG, "#f6bfac", (await VesktopNative.app.getAccentColor()).substring(1));
|
||||
|
||||
const canvas = document.createElement("canvas");
|
||||
canvas.width = 128;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?xml version="1.0"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000">
|
||||
<circle cx="500" cy="500" r="400" stroke="#F35959" stroke-width="50" fill="#F35959"/>
|
||||
<circle cx="500" cy="500" r="200" stroke="#F35959" stroke-width="50" fill="white"/>
|
||||
<circle cx="500" cy="500" r="300" stroke="#f6bfac" stroke-width="50" fill="#f6bfac"/>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 277 B After Width: | Height: | Size: 188 B |
Loading…
Reference in a new issue