mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-10 06:20:03 +00:00
feat: use @input on titlebar component; chore: comment cleaning
This commit is contained in:
parent
af515e01cf
commit
2fa612fe2c
@ -92,11 +92,8 @@ export class Window {
|
||||
if (this.configStore.appearance?.frame === 'native') {
|
||||
bwOptions.frame = true
|
||||
} else {
|
||||
if (process.platform === 'darwin') {
|
||||
bwOptions.titleBarStyle = 'hidden'
|
||||
// If not macOS and native appearance is not toggled, use WCO.
|
||||
} else {
|
||||
bwOptions.titleBarStyle = 'hidden'
|
||||
bwOptions.titleBarStyle = 'hidden'
|
||||
if (process.platform === 'win32') {
|
||||
bwOptions.titleBarOverlay = {
|
||||
color: '#00000000',
|
||||
}
|
||||
@ -106,7 +103,6 @@ export class Window {
|
||||
if (process.platform === 'darwin') {
|
||||
this.window = new BrowserWindow(bwOptions) as GlasstronWindow
|
||||
} else {
|
||||
// this.window = new BrowserWindow(bwOptions) as GlasstronWindow
|
||||
this.window = new glasstron.BrowserWindow(bwOptions)
|
||||
}
|
||||
|
||||
@ -193,7 +189,6 @@ export class Window {
|
||||
} catch (error) {
|
||||
console.error('Failed to set window blur', error)
|
||||
}
|
||||
// }
|
||||
} else {
|
||||
DwmEnableBlurBehindWindow(this.window.getNativeWindowHandle(), enabled)
|
||||
}
|
||||
@ -397,12 +392,10 @@ export class Window {
|
||||
return
|
||||
}
|
||||
|
||||
// let color: string = theme.backgroundMore
|
||||
const symbolColor: string = theme.foreground
|
||||
|
||||
this.window.setTitleBarOverlay(
|
||||
{
|
||||
// color: '#00000000',
|
||||
symbolColor: symbolColor,
|
||||
height: 32,
|
||||
},
|
||||
|
@ -1,7 +1,7 @@
|
||||
title-bar(
|
||||
*ngIf='ready && !hostWindow.isFullscreen && config.store.appearance.frame == "full" && config.store.appearance.dock == "off"',
|
||||
(dblclick)='hostWindow.toggleMaximize()',
|
||||
[class.hide-controls]='hostApp.platform !== Platform.Linux && !hostWindow.isFullscreen',
|
||||
[hide-controls]='hostApp.platform !== Platform.Linux && !hostWindow.isFullscreen',
|
||||
[class.inset]='hostApp.platform == Platform.macOS && !hostWindow.isFullscreen'
|
||||
)
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
.title((dblclick)='hostWindow.toggleMaximize()') Tabby
|
||||
window-controls
|
||||
window-controls(*ngIf="!hideControls")
|
||||
|
@ -23,11 +23,4 @@ $titlebar-height: 30px;
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
// Account for WCO on Windows.
|
||||
&.hide-controls {
|
||||
window-controls {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Component } from '@angular/core'
|
||||
import { Component, Input } from '@angular/core'
|
||||
import { HostWindowService } from '../api'
|
||||
|
||||
/** @hidden */
|
||||
@ -8,5 +8,7 @@ import { HostWindowService } from '../api'
|
||||
styleUrls: ['./titleBar.component.scss'],
|
||||
})
|
||||
export class TitleBarComponent {
|
||||
@Input() hideControls: boolean;
|
||||
|
||||
constructor (public hostWindow: HostWindowService) { }
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user