diff --git a/ivette/src/dome/main/dome.ts b/ivette/src/dome/main/dome.ts index 5595324886e8c7a63afa3b34992005804d0276ca..8296d357d9760c98ee9f4320b13aed3535ebfd39 100644 --- a/ivette/src/dome/main/dome.ts +++ b/ivette/src/dome/main/dome.ts @@ -621,7 +621,7 @@ ipcMain.handle( // -------------------------------------------------------------------------- -ipcMain.handle('theme-color:switch', (_, theme: 'dark' | 'light') => { +ipcMain.handle('theme-color:switch', (_evt, theme: 'dark' | 'light') => { // const theme = nativeTheme.shouldUseDarkColors ? 'light' : 'dark'; nativeTheme.themeSource = theme; // return nativeTheme.shouldUseDarkColors; diff --git a/ivette/src/renderer/Preferences.tsx b/ivette/src/renderer/Preferences.tsx index 21f6a3b60b1f963a3498d21e53594651bfec3847..6a2e8777fa98dd97b0595d13bfd8f53f70c8f16b 100644 --- a/ivette/src/renderer/Preferences.tsx +++ b/ivette/src/renderer/Preferences.tsx @@ -46,28 +46,15 @@ import * as P from 'ivette/prefs'; // -------------------------------------------------------------------------- function ThemeFields(props: P.ThemeProps) { - const theme = Forms.useDefined(Forms.useValid( - Settings.useGlobalSettings(props.theme), - )); const fontsize = Forms.useValid( Settings.useGlobalSettings(props.fontSize), ); const wraptext = Forms.useValid( Settings.useGlobalSettings(props.wrapText), ); - const options = P.THEMES.map(({ id, label }) => ( - <option key={id} value={id} label={label} /> - )); const { target } = props; return ( <> - <Forms.SelectField - state={theme} - label="Theme" - title={`Set the color theme of ${target}`} - > - {options} - </Forms.SelectField> <Forms.SliderField state={fontsize} label="Font Size" @@ -109,7 +96,6 @@ export default function Preferences() { <Forms.Section label="AST View" unfold> <ThemeFields target="Internal AST" - theme={P.AstTheme} fontSize={P.AstFontSize} wrapText={P.AstWrapText} /> @@ -117,7 +103,6 @@ export default function Preferences() { <Forms.Section label="Source View" unfold> <ThemeFields target="Source Code" - theme={P.SourceTheme} fontSize={P.SourceFontSize} wrapText={P.SourceWrapText} />