Commit 208ddbae authored by LianaHus's avatar LianaHus

fixed filteres for icons.

parent c8e424d8
...@@ -173,11 +173,12 @@ export class VerticalIcons extends Plugin { ...@@ -173,11 +173,12 @@ export class VerticalIcons extends Plugin {
addActive (name) { addActive (name) {
const themeType = globalRegistry.get('themeModule').api.currentTheme().quality const themeType = globalRegistry.get('themeModule').api.currentTheme().quality
const invert = themeType === 'dark' ? 1 : 0 const invert = themeType === 'dark' ? 1 : 0
const brightness = themeType === 'dark' ? '150' : '0' // should be >100 for icons with color
const nextActive = this.view.querySelector(`[plugin="${name}"]`) const nextActive = this.view.querySelector(`[plugin="${name}"]`)
if (nextActive) { if (nextActive) {
let image = nextActive.querySelector('.image') let image = nextActive.querySelector('.image')
nextActive.classList.add(`active`) nextActive.classList.add(`active`)
image.style.setProperty('filter', `invert(${invert}) grayscale(1) brightness(0%)`) image.style.setProperty('filter', `invert(${invert}) grayscale(1) brightness(${brightness}%)`)
} }
} }
......
This diff is collapsed.
...@@ -156,10 +156,9 @@ const css = csjs` ...@@ -156,10 +156,9 @@ const css = csjs`
padding-right: 5px; padding-right: 5px;
word-break: break-all; word-break: break-all;
} }
.image { .swarmLogo {
width: 20px; width: 20px;
height: 20px; height: 20px;
filter: invert(0.5);
} }
.spinningIcon { .spinningIcon {
display: inline-block; display: inline-block;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment