mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-20 19:39:54 +00:00
Merge pull request #2657 from 3l0w/master
This commit is contained in:
commit
32f6e16275
@ -1,3 +1,5 @@
|
|||||||
|
import * as glasstron from 'glasstron'
|
||||||
|
glasstron.init()
|
||||||
import { Subject, Observable } from 'rxjs'
|
import { Subject, Observable } from 'rxjs'
|
||||||
import { debounceTime } from 'rxjs/operators'
|
import { debounceTime } from 'rxjs/operators'
|
||||||
import { BrowserWindow, app, ipcMain, Rectangle, Menu, screen } from 'electron'
|
import { BrowserWindow, app, ipcMain, Rectangle, Menu, screen } from 'electron'
|
||||||
@ -82,11 +84,13 @@ export class Window {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (process.platform === 'linux') {
|
|
||||||
bwOptions.backgroundColor = '#131d27'
|
|
||||||
}
|
|
||||||
|
|
||||||
this.window = new BrowserWindow(bwOptions)
|
this.window = new BrowserWindow(bwOptions)
|
||||||
|
|
||||||
|
if (process.platform === 'linux') {
|
||||||
|
glasstron.update(this.window, {
|
||||||
|
linux: { requestBlur: true },
|
||||||
|
})
|
||||||
|
}
|
||||||
this.window.once('ready-to-show', () => {
|
this.window.once('ready-to-show', () => {
|
||||||
if (process.platform === 'darwin') {
|
if (process.platform === 'darwin') {
|
||||||
this.window.setVibrancy('window')
|
this.window.setVibrancy('window')
|
||||||
@ -146,6 +150,8 @@ export class Window {
|
|||||||
} else {
|
} else {
|
||||||
DwmEnableBlurBehindWindow(this.window, enabled)
|
DwmEnableBlurBehindWindow(this.window, enabled)
|
||||||
}
|
}
|
||||||
|
}else if(process.platform ==='linux'){
|
||||||
|
this.window.setBackgroundColor(enabled ? '#00000000' : '#131d27')
|
||||||
} else {
|
} else {
|
||||||
this.window.setVibrancy(enabled ? 'dark' : null as any) // electron issue 20269
|
this.window.setVibrancy(enabled ? 'dark' : null as any) // electron issue 20269
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
"eslint-plugin-import": "^2.20.2",
|
"eslint-plugin-import": "^2.20.2",
|
||||||
"file-loader": "^5.0.2",
|
"file-loader": "^5.0.2",
|
||||||
"graceful-fs": "^4.2.4",
|
"graceful-fs": "^4.2.4",
|
||||||
|
"glasstron": "0.0.3",
|
||||||
"html-loader": "0.5.5",
|
"html-loader": "0.5.5",
|
||||||
"json-loader": "0.5.7",
|
"json-loader": "0.5.7",
|
||||||
"node-abi": "^2.16.0",
|
"node-abi": "^2.16.0",
|
||||||
|
@ -52,9 +52,9 @@ ngb-tabset.vertical(type='pills', [activeId]='activeTab')
|
|||||||
)
|
)
|
||||||
| At the bottom
|
| At the bottom
|
||||||
|
|
||||||
.form-line(*ngIf='hostApp.platform !== Platform.Linux')
|
.form-line
|
||||||
.header
|
.header
|
||||||
.title(*ngIf='hostApp.platform === Platform.Windows') Acrylic background
|
.title(*ngIf='hostApp.platform !== Platform.macOS') Acrylic background
|
||||||
.title(*ngIf='hostApp.platform === Platform.macOS') Vibrancy
|
.title(*ngIf='hostApp.platform === Platform.macOS') Vibrancy
|
||||||
.description Gives the window a blurred transparent background
|
.description Gives the window a blurred transparent background
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user