mirror of
https://github.com/Eugeny/tabby.git
synced 2025-10-04 22:14:55 +00:00
.
This commit is contained in:
@@ -13,3 +13,4 @@ export { ElectronService } from '../services/electron.service'
|
||||
export { Logger, LogService } from '../services/log.service'
|
||||
export { HotkeysService } from '../services/hotkeys.service'
|
||||
export { HostAppService, Platform } from '../services/hostApp.service'
|
||||
export { ThemesService } from '../services/themes.service'
|
||||
|
@@ -21,6 +21,10 @@ export class ThemesService {
|
||||
return this.themes.find(x => x.name === name)
|
||||
}
|
||||
|
||||
findCurrentTheme (): Theme {
|
||||
return this.findTheme(this.config.store.appearance.theme) || this.findTheme('Standard')
|
||||
}
|
||||
|
||||
applyTheme (theme: Theme): void {
|
||||
if (!this.styleElement) {
|
||||
this.styleElement = document.createElement('style')
|
||||
@@ -31,10 +35,6 @@ export class ThemesService {
|
||||
}
|
||||
|
||||
applyCurrentTheme (): void {
|
||||
let theme = this.findTheme(this.config.store.appearance.theme)
|
||||
if (!theme) {
|
||||
theme = this.findTheme('Standard')
|
||||
}
|
||||
this.applyTheme(theme)
|
||||
this.applyTheme(this.findCurrentTheme())
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user