From fa663e99a652da682b4aeaae8c98975ec4b4e07e Mon Sep 17 00:00:00 2001 From: lianahus Date: Wed, 18 May 2022 13:45:08 +0200 Subject: [PATCH] fixed icons' colors --- apps/remix-ide/src/app/panels/tab-proxy.js | 15 +++++++++++++-- .../home-tab/src/lib/remix-ui-home-tab.tsx | 1 - libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/apps/remix-ide/src/app/panels/tab-proxy.js b/apps/remix-ide/src/app/panels/tab-proxy.js index ec8026c517..e30782eee6 100644 --- a/apps/remix-ide/src/app/panels/tab-proxy.js +++ b/apps/remix-ide/src/app/panels/tab-proxy.js @@ -24,7 +24,7 @@ export class TabProxy extends Plugin { this.themeQuality = 'dark' } - onActivation () { + async onActivation () { this.on('theme', 'themeChanged', (theme) => { this.themeQuality = theme.quality // update invert for all icons @@ -169,6 +169,9 @@ export class TabProxy extends Plugin { this.on('manager', 'pluginDeactivated', (profile) => { this.removeTab(profile.name) }) + + this.themeQuality = (await this.call('theme', 'currentTheme') ).quality + this.renderComponent() } focus (name) { @@ -292,7 +295,15 @@ export class TabProxy extends Plugin { } updateComponent(state) { - return + return } renderComponent () { diff --git a/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx b/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx index 52c50c6dba..d04ed49e71 100644 --- a/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx +++ b/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx @@ -4,7 +4,6 @@ import './remix-ui-home-tab.css' import { ModalDialog } from '@remix-ui/modal-dialog' // eslint-disable-line import { Toaster } from '@remix-ui/toaster' // eslint-disable-line import PluginButton from './components/pluginButton' // eslint-disable-line -import { QueryParams } from '@remix-project/remix-lib' import { ThemeContext, themes } from './themeContext' declare global { interface Window { diff --git a/libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx b/libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx index 1009f5aca3..499d0d1eb1 100644 --- a/libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx +++ b/libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx @@ -10,7 +10,7 @@ export interface TabsUIProps { onZoomOut: () => void onZoomIn: () => void onReady: (api: any) => void - themeQuality: "dark" + themeQuality: string } export interface TabsUIApi {