Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
后端镜像
Tabby
提交
8f0f1b19
T
Tabby
项目概览
后端镜像
/
Tabby
通知
31
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Tabby
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8f0f1b19
编写于
10月 13, 2018
作者:
E
Eugene Pankov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
allow selecting windows vibrancy type (fixes #460)
上级
7b33d890
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
42 addition
and
9 deletion
+42
-9
app/lib/window.ts
app/lib/window.ts
+4
-4
terminus-core/src/components/appRoot.component.ts
terminus-core/src/components/appRoot.component.ts
+1
-1
terminus-core/src/configDefaults.yaml
terminus-core/src/configDefaults.yaml
+1
-0
terminus-core/src/services/hostApp.service.ts
terminus-core/src/services/hostApp.service.ts
+2
-2
terminus-settings/src/components/settingsTab.component.pug
terminus-settings/src/components/settingsTab.component.pug
+23
-0
terminus-settings/src/components/settingsTab.component.ts
terminus-settings/src/components/settingsTab.component.ts
+6
-0
terminus-settings/webpack.config.js
terminus-settings/webpack.config.js
+1
-0
terminus-terminal/src/services/terminal.service.ts
terminus-terminal/src/services/terminal.service.ts
+4
-2
未找到文件。
app/lib/window.ts
浏览文件 @
8f0f1b19
...
...
@@ -88,13 +88,13 @@ export class Window {
})
}
setVibrancy
(
enabled
:
boolean
)
{
setVibrancy
(
enabled
:
boolean
,
type
?:
string
)
{
if
(
process
.
platform
===
'
win32
'
)
{
if
(
parseFloat
(
os
.
release
())
>=
10
)
{
let
attribValue
=
AccentState
.
ACCENT_DISABLED
let
color
=
0x00000000
if
(
enabled
)
{
if
(
parseInt
(
os
.
release
().
split
(
'
.
'
)[
2
])
>=
17063
)
{
if
(
parseInt
(
os
.
release
().
split
(
'
.
'
)[
2
])
>=
17063
&&
type
===
'
fluent
'
)
{
attribValue
=
AccentState
.
ACCENT_ENABLE_FLUENT
color
=
0x01000000
// using a small alpha because acrylic bugs out at full transparency.
}
else
{
...
...
@@ -186,8 +186,8 @@ export class Window {
this
.
window
.
setAlwaysOnTop
(
flag
)
})
ipcMain
.
on
(
'
window-set-vibrancy
'
,
(
_event
,
enabled
)
=>
{
this
.
setVibrancy
(
enabled
)
ipcMain
.
on
(
'
window-set-vibrancy
'
,
(
_event
,
enabled
,
type
)
=>
{
this
.
setVibrancy
(
enabled
,
type
)
})
ipcMain
.
on
(
'
window-set-title
'
,
(
_event
,
title
)
=>
{
...
...
terminus-core/src/components/appRoot.component.ts
浏览文件 @
8f0f1b19
...
...
@@ -224,7 +224,7 @@ export class AppRootComponent {
}
private
updateVibrancy
()
{
this
.
hostApp
.
setVibrancy
(
this
.
config
.
store
.
appearance
.
vibrancy
)
this
.
hostApp
.
setVibrancy
(
this
.
config
.
store
.
appearance
.
vibrancy
,
this
.
config
.
store
.
appearance
.
vibrancyType
)
this
.
hostApp
.
getWindow
().
setOpacity
(
this
.
config
.
store
.
appearance
.
opacity
)
}
}
terminus-core/src/configDefaults.yaml
浏览文件 @
8f0f1b19
...
...
@@ -9,4 +9,5 @@ appearance:
css
:
'
/*
*
{
color:
blue
!important;
}
*/'
opacity
:
1.0
vibrancy
:
false
vibrancyType
:
'
blur'
enableAnalytics
:
true
terminus-core/src/services/hostApp.service.ts
浏览文件 @
8f0f1b19
...
...
@@ -150,13 +150,13 @@ export class HostAppService {
this
.
electron
.
ipcRenderer
.
send
(
'
window-set-always-on-top
'
,
flag
)
}
setVibrancy
(
enable
:
boolean
)
{
setVibrancy
(
enable
:
boolean
,
type
:
string
)
{
document
.
body
.
classList
.
toggle
(
'
vibrant
'
,
enable
)
if
(
this
.
platform
===
Platform
.
macOS
)
{
this
.
getWindow
().
setVibrancy
(
enable
?
'
dark
'
:
null
)
}
if
(
this
.
platform
===
Platform
.
Windows
)
{
this
.
electron
.
ipcRenderer
.
send
(
'
window-set-vibrancy
'
,
enable
)
this
.
electron
.
ipcRenderer
.
send
(
'
window-set-vibrancy
'
,
enable
,
type
)
}
}
...
...
terminus-settings/src/components/settingsTab.component.pug
浏览文件 @
8f0f1b19
...
...
@@ -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
...
...
terminus-settings/src/components/settingsTab.component.ts
浏览文件 @
8f0f1b19
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
()
{
...
...
terminus-settings/webpack.config.js
浏览文件 @
8f0f1b19
...
...
@@ -46,6 +46,7 @@ module.exports = {
externals
:
[
'
fs
'
,
'
path
'
,
'
os
'
,
/^rxjs/
,
/^@angular/
,
/^@ng-bootstrap/
,
...
...
terminus-terminal/src/services/terminal.service.ts
浏览文件 @
8f0f1b19
...
...
@@ -29,12 +29,14 @@ export class TerminalService {
async
getShells
():
Promise
<
IShell
[]
>
{
let
shellLists
=
await
Promise
.
all
(
this
.
config
.
enabledServices
(
this
.
shellProviders
).
map
(
x
=>
x
.
provide
()))
return
shellLists
.
reduce
((
a
,
b
)
=>
a
.
concat
(
b
))
return
shellLists
.
reduce
((
a
,
b
)
=>
a
.
concat
(
b
)
,
[]
)
}
async
reloadShells
()
{
this
.
shells
=
new
AsyncSubject
<
IShell
[]
>
()
this
.
shells
.
next
(
await
this
.
getShells
())
let
shells
=
await
this
.
getShells
()
this
.
logger
.
debug
(
'
Shells list:
'
,
shells
)
this
.
shells
.
next
(
shells
)
this
.
shells
.
complete
()
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录