mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-08 21:40:03 +00:00
macOS vibrancy fixes
This commit is contained in:
parent
109a83db5b
commit
75764cd725
@ -27,7 +27,7 @@ abstract class GlasstronWindow extends BrowserWindow {
|
|||||||
abstract setBlur (_: boolean)
|
abstract setBlur (_: boolean)
|
||||||
}
|
}
|
||||||
|
|
||||||
const macOSVibrancyType = process.platform === 'darwin' ? compareVersions(macOSRelease().version, '10.14', '>=') ? 'fullscreen-ui' : 'dark' : null
|
const macOSVibrancyType = process.platform === 'darwin' ? compareVersions(macOSRelease().version, '10.14', '>=') ? 'under-window' : 'dark' : null
|
||||||
|
|
||||||
const activityIcon = nativeImage.createFromPath(`${app.getAppPath()}/assets/activity.png`)
|
const activityIcon = nativeImage.createFromPath(`${app.getAppPath()}/assets/activity.png`)
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
body {
|
body {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: #1D272D;
|
background: transparent !important;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
app-root {
|
||||||
|
background: #1D272D;
|
||||||
|
}
|
||||||
|
|
||||||
.preload-logo {
|
.preload-logo {
|
||||||
-webkit-app-region: drag;
|
-webkit-app-region: drag;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
@ -214,6 +214,10 @@ export class AppRootComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@HostBinding('class.vibrant') get isVibrant () {
|
||||||
|
return this.config.store.appearance.vibrancy
|
||||||
|
}
|
||||||
|
|
||||||
private getToolbarButtons (aboveZero: boolean): ToolbarButton[] {
|
private getToolbarButtons (aboveZero: boolean): ToolbarButton[] {
|
||||||
let buttons: ToolbarButton[] = []
|
let buttons: ToolbarButton[] = []
|
||||||
this.config.enabledServices(this.toolbarButtonProviders).forEach(provider => {
|
this.config.enabledServices(this.toolbarButtonProviders).forEach(provider => {
|
||||||
|
@ -117,15 +117,13 @@ window-controls {
|
|||||||
|
|
||||||
$border-color: $base1;
|
$border-color: $base1;
|
||||||
|
|
||||||
body {
|
app-root {
|
||||||
background: $body-bg;
|
background: $body-bg;
|
||||||
|
|
||||||
&.vibrant {
|
&.vibrant {
|
||||||
background: rgba(255, 255, 255,.4) !important;
|
background: rgba(255, 255, 255,.4) !important;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
app-root {
|
|
||||||
&> .content {
|
&> .content {
|
||||||
.tab-bar {
|
.tab-bar {
|
||||||
.btn-tab-bar {
|
.btn-tab-bar {
|
||||||
|
@ -25,15 +25,13 @@ window-controls {
|
|||||||
|
|
||||||
$border-color: #111;
|
$border-color: #111;
|
||||||
|
|
||||||
body {
|
app-root {
|
||||||
background: $body-bg;
|
background: $body-bg;
|
||||||
|
|
||||||
&.vibrant {
|
&.vibrant {
|
||||||
background: rgba(0,0,0,.65);
|
background: rgba(0,0,0,.65);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
app-root {
|
|
||||||
&.no-tabs {
|
&.no-tabs {
|
||||||
background: rgba(0,0,0,.5);
|
background: rgba(0,0,0,.5);
|
||||||
}
|
}
|
||||||
|
@ -116,7 +116,6 @@ export default class ElectronModule {
|
|||||||
if (this.hostApp.platform === Platform.Windows && !isWindowsBuild(WIN_BUILD_FLUENT_BG_SUPPORTED)) {
|
if (this.hostApp.platform === Platform.Windows && !isWindowsBuild(WIN_BUILD_FLUENT_BG_SUPPORTED)) {
|
||||||
vibrancyType = null
|
vibrancyType = null
|
||||||
}
|
}
|
||||||
document.body.classList.toggle('vibrant', this.config.store.appearance.vibrancy)
|
|
||||||
this.electron.ipcRenderer.send('window-set-vibrancy', this.config.store.appearance.vibrancy, vibrancyType)
|
this.electron.ipcRenderer.send('window-set-vibrancy', this.config.store.appearance.vibrancy, vibrancyType)
|
||||||
|
|
||||||
this.hostWindow.setOpacity(this.config.store.appearance.opacity)
|
this.hostWindow.setOpacity(this.config.store.appearance.opacity)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user