mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-20 02:18:01 +00:00
Set the application's dark mode to follow the app settings on macOS. (#10186)
This commit is contained in:
@@ -130,7 +130,10 @@ export default class ElectronModule {
|
||||
})
|
||||
})
|
||||
|
||||
config.changed$.subscribe(() => this.updateVibrancy())
|
||||
config.changed$.subscribe(() => {
|
||||
this.updateVibrancy()
|
||||
this.updateDarkMode()
|
||||
})
|
||||
|
||||
config.changed$.subscribe(() => this.updateWindowControlsColor())
|
||||
|
||||
@@ -173,6 +176,11 @@ export default class ElectronModule {
|
||||
this.hostWindow.setOpacity(this.config.store.appearance.opacity)
|
||||
}
|
||||
|
||||
private updateDarkMode () {
|
||||
const colorSchemeMode = this.config.store.appearance.colorSchemeMode
|
||||
this.electron.ipcRenderer.send('window-set-dark-mode', colorSchemeMode)
|
||||
}
|
||||
|
||||
private updateWindowControlsColor () {
|
||||
// if windows and not using native frame, WCO does not exist, return.
|
||||
if (this.hostApp.platform === Platform.Windows && this.config.store.appearance.frame === 'native') {
|
||||
|
Reference in New Issue
Block a user