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