diff options
author | 2021-12-26 01:59:17 +0100 | |
---|---|---|
committer | 2021-12-26 01:59:17 +0100 | |
commit | cce40ab1d2ad8cc1b60fabb4cc8281ea0490a123 (patch) | |
tree | bb96df2676934a9cd4ef2bc5a48957e8b32fb646 /packages/renderer/src/stores/RootStore.ts | |
parent | refactor: Simplify browserViewBounds handling (diff) | |
download | sophie-cce40ab1d2ad8cc1b60fabb4cc8281ea0490a123.tar.gz sophie-cce40ab1d2ad8cc1b60fabb4cc8281ea0490a123.tar.zst sophie-cce40ab1d2ad8cc1b60fabb4cc8281ea0490a123.zip |
feat: Set nativeTheme theme source on dark mode
Diffstat (limited to 'packages/renderer/src/stores/RootStore.ts')
-rw-r--r-- | packages/renderer/src/stores/RootStore.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/renderer/src/stores/RootStore.ts b/packages/renderer/src/stores/RootStore.ts index c6533ba..20e0afa 100644 --- a/packages/renderer/src/stores/RootStore.ts +++ b/packages/renderer/src/stores/RootStore.ts | |||
@@ -29,9 +29,9 @@ import { | |||
29 | import { | 29 | import { |
30 | BrowserViewBounds, | 30 | BrowserViewBounds, |
31 | emptySharedStore, | 31 | emptySharedStore, |
32 | PaletteMode, | ||
33 | sharedStore, | 32 | sharedStore, |
34 | SophieRenderer, | 33 | SophieRenderer, |
34 | ThemeSource, | ||
35 | } from '@sophie/shared'; | 35 | } from '@sophie/shared'; |
36 | 36 | ||
37 | export interface RootEnv { | 37 | export interface RootEnv { |
@@ -55,14 +55,14 @@ export const rootStore = types.model('RootStore', { | |||
55 | setBrowserViewBounds(bounds: BrowserViewBounds) { | 55 | setBrowserViewBounds(bounds: BrowserViewBounds) { |
56 | getEnv(self).ipc.setBrowserViewBounds(bounds); | 56 | getEnv(self).ipc.setBrowserViewBounds(bounds); |
57 | }, | 57 | }, |
58 | setPaletteMode(mode: PaletteMode) { | 58 | setThemeSource(mode: ThemeSource) { |
59 | getEnv(self).ipc.setPaletteMode(mode); | 59 | getEnv(self).ipc.setThemeSource(mode); |
60 | }, | 60 | }, |
61 | toggleDarkMode() { | 61 | toggleDarkMode() { |
62 | if (self.shared.shouldUseDarkColors) { | 62 | if (self.shared.shouldUseDarkColors) { |
63 | this.setPaletteMode('light'); | 63 | this.setThemeSource('light'); |
64 | } else { | 64 | } else { |
65 | this.setPaletteMode('dark'); | 65 | this.setThemeSource('dark'); |
66 | } | 66 | } |
67 | }, | 67 | }, |
68 | })); | 68 | })); |