allow selecting windows vibrancy type (fixes #460)

This commit is contained in:
Eugene Pankov
2018-10-13 04:30:12 -07:00
parent 7b33d89032
commit 8f0f1b19df
8 changed files with 42 additions and 9 deletions

View File

@@ -69,6 +69,29 @@ ngb-tabset.vertical(type='pills', [activeId]='activeTab')
(ngModelChange)='config.save()'
)
.form-line(*ngIf='config.store.appearance.vibrancy && isFluentVibrancySupported')
.header
.title Vibrancy type
.btn-group(
[(ngModel)]='config.store.appearance.vibrancyType',
(ngModelChange)='config.save()',
ngbRadioGroup
)
label.btn.btn-secondary(ngbButtonLabel)
input(
type='radio',
ngbButton,
[value]='"blur"'
)
| Blur
label.btn.btn-secondary(ngbButtonLabel)
input(
type='radio',
ngbButton,
[value]='"fluent"'
)
| Fluent
.form-line
.header
.title Window opacity

View File

@@ -1,4 +1,5 @@
import * as yaml from 'js-yaml'
import * as os from 'os'
import { Subscription } from 'rxjs'
import { Component, Inject, Input } from '@angular/core'
import { HotkeysService } from 'terminus-core'
@@ -35,6 +36,7 @@ export class SettingsTabComponent extends BaseTabComponent {
configDefaults: any
configFile: string
isShellIntegrationInstalled = false
isFluentVibrancySupported = false
private configSubscription: Subscription
constructor (
@@ -64,6 +66,10 @@ export class SettingsTabComponent extends BaseTabComponent {
hotkeys.getHotkeyDescriptions().then(descriptions => {
this.hotkeyDescriptions = descriptions
})
this.isFluentVibrancySupported = process.platform === 'win32'
&& parseFloat(os.release()) >= 10
&& parseInt(os.release().split('.')[2]) >= 17063
}
async ngOnInit () {