mirror of
https://github.com/Eugeny/tabby.git
synced 2025-08-17 23:01:53 +00:00
fixed settings sidebar offset (fixes #549)
This commit is contained in:
@@ -1,14 +1,13 @@
|
|||||||
import * as yaml from 'js-yaml'
|
import * as yaml from 'js-yaml'
|
||||||
import * as os from 'os'
|
import * as os from 'os'
|
||||||
import { Subscription } from 'rxjs'
|
import { Subscription } from 'rxjs'
|
||||||
import { Component, Inject, Input } from '@angular/core'
|
import { Component, Inject, Input, HostBinding } from '@angular/core'
|
||||||
import { HotkeysService } from 'terminus-core'
|
import { HotkeysService } from 'terminus-core'
|
||||||
import {
|
import {
|
||||||
ElectronService,
|
ElectronService,
|
||||||
DockingService,
|
DockingService,
|
||||||
ConfigService,
|
ConfigService,
|
||||||
IHotkeyDescription,
|
IHotkeyDescription,
|
||||||
HotkeyProvider,
|
|
||||||
BaseTabComponent,
|
BaseTabComponent,
|
||||||
Theme,
|
Theme,
|
||||||
HostAppService,
|
HostAppService,
|
||||||
@@ -37,6 +36,7 @@ export class SettingsTabComponent extends BaseTabComponent {
|
|||||||
configFile: string
|
configFile: string
|
||||||
isShellIntegrationInstalled = false
|
isShellIntegrationInstalled = false
|
||||||
isFluentVibrancySupported = false
|
isFluentVibrancySupported = false
|
||||||
|
@HostBinding('class.pad-window-controls') padWindowControls = false
|
||||||
private configSubscription: Subscription
|
private configSubscription: Subscription
|
||||||
|
|
||||||
constructor (
|
constructor (
|
||||||
@@ -47,7 +47,6 @@ export class SettingsTabComponent extends BaseTabComponent {
|
|||||||
public homeBase: HomeBaseService,
|
public homeBase: HomeBaseService,
|
||||||
public shellIntegration: ShellIntegrationService,
|
public shellIntegration: ShellIntegrationService,
|
||||||
hotkeys: HotkeysService,
|
hotkeys: HotkeysService,
|
||||||
@Inject(HotkeyProvider) hotkeyProviders: HotkeyProvider[],
|
|
||||||
@Inject(SettingsTabProvider) public settingsProviders: SettingsTabProvider[],
|
@Inject(SettingsTabProvider) public settingsProviders: SettingsTabProvider[],
|
||||||
@Inject(Theme) public themes: Theme[],
|
@Inject(Theme) public themes: Theme[],
|
||||||
) {
|
) {
|
||||||
@@ -58,16 +57,21 @@ export class SettingsTabComponent extends BaseTabComponent {
|
|||||||
this.themes = config.enabledServices(this.themes)
|
this.themes = config.enabledServices(this.themes)
|
||||||
|
|
||||||
this.configDefaults = yaml.safeDump(config.getDefaults())
|
this.configDefaults = yaml.safeDump(config.getDefaults())
|
||||||
this.configFile = config.readRaw()
|
|
||||||
this.configSubscription = config.changed$.subscribe(() => {
|
const onConfigChange = () => {
|
||||||
this.configFile = config.readRaw()
|
this.configFile = config.readRaw()
|
||||||
})
|
this.padWindowControls = hostApp.platform === Platform.macOS
|
||||||
|
&& config.store.appearance.tabsLocation === 'bottom'
|
||||||
|
}
|
||||||
|
|
||||||
|
this.configSubscription = config.changed$.subscribe(onConfigChange)
|
||||||
|
onConfigChange()
|
||||||
|
|
||||||
hotkeys.getHotkeyDescriptions().then(descriptions => {
|
hotkeys.getHotkeyDescriptions().then(descriptions => {
|
||||||
this.hotkeyDescriptions = descriptions
|
this.hotkeyDescriptions = descriptions
|
||||||
})
|
})
|
||||||
|
|
||||||
this.isFluentVibrancySupported = process.platform === 'win32'
|
this.isFluentVibrancySupported = hostApp.platform === Platform.Windows
|
||||||
&& parseFloat(os.release()) >= 10
|
&& parseFloat(os.release()) >= 10
|
||||||
&& parseInt(os.release().split('.')[2]) >= 17063
|
&& parseInt(os.release().split('.')[2]) >= 17063
|
||||||
}
|
}
|
||||||
|
@@ -21,3 +21,7 @@
|
|||||||
:host /deep/ ngb-tabset > .tab-content > .tab-pane {
|
:host /deep/ ngb-tabset > .tab-content > .tab-pane {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:host.pad-window-controls /deep/ ngb-tabset > .nav {
|
||||||
|
padding-top: 40px;
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user