fix: the color mode button must not reset the primary color

pull/2522/head
William Grant 3 years ago
parent cf8a66a82b
commit 99ff6243ed

@ -73,9 +73,11 @@ const Section = (props: { type: SectionType }) => {
? currentTheme.replace('light', 'dark')
: currentTheme.replace('dark', 'light')) as ThemeStateType;
// We want to persist the primary color when using the color mode button
await switchThemeTo({
theme: newTheme,
mainWindow: true,
usePrimaryColor: true,
dispatch,
});
} else if (type === SectionType.PathIndicator) {

@ -3,7 +3,6 @@ import { COLORS, THEMES } from './constants/colors';
import { ThemeColorVariables } from './variableColors';
const classicDark: ThemeColorVariables = {
'--primary-color': THEMES.CLASSIC_DARK.PRIMARY,
'--danger-color': THEMES.CLASSIC_DARK.DANGER,
'--disabled-color': THEMES.CLASSIC_DARK.DISABLED,

@ -3,7 +3,6 @@ import { COLORS, THEMES } from './constants/colors';
import { ThemeColorVariables } from './variableColors';
const classicLight: ThemeColorVariables = {
'--primary-color': THEMES.CLASSIC_LIGHT.PRIMARY,
'--danger-color': THEMES.CLASSIC_LIGHT.DANGER,
'--disabled-color': THEMES.CLASSIC_LIGHT.DISABLED,

@ -3,7 +3,6 @@ import { COLORS, THEMES } from './constants/colors';
import { ThemeColorVariables } from './variableColors';
const oceanDark: ThemeColorVariables = {
'--primary-color': THEMES.OCEAN_DARK.PRIMARY,
'--danger-color': THEMES.OCEAN_DARK.DANGER,
'--disabled-color': THEMES.OCEAN_DARK.DISABLED,

@ -3,7 +3,6 @@ import { COLORS, THEMES } from './constants/colors';
import { ThemeColorVariables } from './variableColors';
const oceanLight: ThemeColorVariables = {
'--primary-color': THEMES.OCEAN_LIGHT.PRIMARY,
'--danger-color': THEMES.OCEAN_LIGHT.DANGER,
'--disabled-color': THEMES.OCEAN_LIGHT.DISABLED,

@ -1,6 +1,5 @@
// Default Theme should be Classic Dark
export type ThemeColorVariables = {
'--primary-color': string;
'--danger-color': string;
'--disabled-color': string;

Loading…
Cancel
Save