Merge pull request #2412 from ethereum/homeiconColor

fixed icons' colors for light theme
pull/5370/head
yann300 3 years ago committed by GitHub
commit fa1499c965
  1. 19
      apps/remix-ide/src/app/panels/tab-proxy.js
  2. 1
      libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx
  3. 2
      libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx

@ -24,7 +24,7 @@ export class TabProxy extends Plugin {
this.themeQuality = 'dark' this.themeQuality = 'dark'
} }
onActivation () { async onActivation () {
this.on('theme', 'themeChanged', (theme) => { this.on('theme', 'themeChanged', (theme) => {
this.themeQuality = theme.quality this.themeQuality = theme.quality
// update invert for all icons // update invert for all icons
@ -169,6 +169,13 @@ export class TabProxy extends Plugin {
this.on('manager', 'pluginDeactivated', (profile) => { this.on('manager', 'pluginDeactivated', (profile) => {
this.removeTab(profile.name) this.removeTab(profile.name)
}) })
try {
this.themeQuality = (await this.call('theme', 'currentTheme') ).quality
} catch (e) {
console.log('theme plugin has an issue: ', e)
}
this.renderComponent()
} }
focus (name) { focus (name) {
@ -292,7 +299,15 @@ export class TabProxy extends Plugin {
} }
updateComponent(state) { updateComponent(state) {
return <TabsUI tabs={state.loadedTabs} onSelect={state.onSelect} onClose={state.onClose} onZoomIn={state.onZoomIn} onZoomOut={state.onZoomOut} onReady={state.onReady} themeQuality={state.themeQuality} /> return <TabsUI
tabs={state.loadedTabs}
onSelect={state.onSelect}
onClose={state.onClose}
onZoomIn={state.onZoomIn}
onZoomOut={state.onZoomOut}
onReady={state.onReady}
themeQuality={state.themeQuality}
/>
} }
renderComponent () { renderComponent () {

@ -4,7 +4,6 @@ import './remix-ui-home-tab.css'
import { ModalDialog } from '@remix-ui/modal-dialog' // eslint-disable-line import { ModalDialog } from '@remix-ui/modal-dialog' // eslint-disable-line
import { Toaster } from '@remix-ui/toaster' // eslint-disable-line import { Toaster } from '@remix-ui/toaster' // eslint-disable-line
import PluginButton from './components/pluginButton' // eslint-disable-line import PluginButton from './components/pluginButton' // eslint-disable-line
import { QueryParams } from '@remix-project/remix-lib'
import { ThemeContext, themes } from './themeContext' import { ThemeContext, themes } from './themeContext'
declare global { declare global {
interface Window { interface Window {

@ -10,7 +10,7 @@ export interface TabsUIProps {
onZoomOut: () => void onZoomOut: () => void
onZoomIn: () => void onZoomIn: () => void
onReady: (api: any) => void onReady: (api: any) => void
themeQuality: "dark" themeQuality: string
} }
export interface TabsUIApi { export interface TabsUIApi {

Loading…
Cancel
Save