mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-23 07:15:11 +00:00
changed grabbing theme color for dot to match the other things in this project
This commit is contained in:
parent
342eda431f
commit
a058c855fc
1 changed files with 4 additions and 1 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
import tinycolor from 'tinycolor2';
|
||||||
|
|
||||||
class FavIconDot {
|
class FavIconDot {
|
||||||
canvas: HTMLCanvasElement;
|
canvas: HTMLCanvasElement;
|
||||||
src: string | null = null;
|
src: string | null = null;
|
||||||
|
@ -70,7 +72,8 @@ class FavIconDot {
|
||||||
if (!this.ctx || !this.faviconImage) return;
|
if (!this.ctx || !this.faviconImage) return;
|
||||||
this.ctx.beginPath();
|
this.ctx.beginPath();
|
||||||
this.ctx.arc(this.faviconImage.width - 10, 10, 10, 0, 2 * Math.PI);
|
this.ctx.arc(this.faviconImage.width - 10, 10, 10, 0, 2 * Math.PI);
|
||||||
this.ctx.fillStyle = getComputedStyle(document.documentElement).getPropertyValue('--navIndicator');
|
const computedStyle = getComputedStyle(document.documentElement);
|
||||||
|
this.ctx.fillStyle = tinycolor(computedStyle.getPropertyValue('--navIndicator')).toHexString();
|
||||||
this.ctx.strokeStyle = 'white';
|
this.ctx.strokeStyle = 'white';
|
||||||
this.ctx.fill();
|
this.ctx.fill();
|
||||||
this.ctx.stroke();
|
this.ctx.stroke();
|
||||||
|
|
Loading…
Reference in a new issue