From c84a046af00b9aed71c4aff597b468f128893876 Mon Sep 17 00:00:00 2001 From: hackademix Date: Tue, 22 Mar 2022 01:35:38 +0100 Subject: [PATCH] Fix status icon not always synchronized with vintage/modern setting. --- src/bg/RequestGuard.js | 6 ++++-- src/ui/ui.css | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/bg/RequestGuard.js b/src/bg/RequestGuard.js index 1c480ed..c99a592 100644 --- a/src/bg/RequestGuard.js +++ b/src/bg/RequestGuard.js @@ -165,8 +165,10 @@ var RequestGuard = (() => { browserAction.setTitle({tabId, title: `NoScript (${numBlocked})`}); return; } - let iconPath = ns.local.vintageTheme ? '/img/vintage' : '/img'; - browserAction.setIcon({tabId, path: {64: `${iconPath}/ui-${icon}64.png`}}); + (async () => { + let iconPath = (await Themes.isVintage()) ? '/img/vintage' : '/img'; + browserAction.setIcon({tabId, path: {64: `${iconPath}/ui-${icon}64.png`}}); + })(); browserAction.setBadgeText({tabId, text: showBadge ? numBlocked.toString() : ""}); browserAction.setBadgeBackgroundColor({tabId, color: [128, 0, 0, 160]}); browserAction.setTitle({tabId, diff --git a/src/ui/ui.css b/src/ui/ui.css index 4e65948..71e02dd 100644 --- a/src/ui/ui.css +++ b/src/ui/ui.css @@ -294,9 +294,9 @@ span.preset { outline: 0; opacity: .6; margin: 0 .5em 0.13em .5em; - background-size: var(--icon-size); - width: var(--icon-size); - height: var(--icon-size); + background-size: contain; + width: var(--line-size); + height: var(--line-size); } #presets-sizer {