mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-19 18:07:58 +00:00
fixed titlebar not adjusting to macOS fullscreen mode - fixes #4274
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
title-bar(
|
||||
*ngIf='ready && !hostWindow.isFullScreen && config.store.appearance.frame == "full" && config.store.appearance.dock == "off"',
|
||||
[class.inset]='hostApp.platform == Platform.macOS && !hostWindow.isFullScreen'
|
||||
*ngIf='ready && !hostWindow.isFullscreen && config.store.appearance.frame == "full" && config.store.appearance.dock == "off"',
|
||||
[class.inset]='hostApp.platform == Platform.macOS && !hostWindow.isFullscreen'
|
||||
)
|
||||
|
||||
.content(
|
||||
@@ -10,7 +10,7 @@ title-bar(
|
||||
)
|
||||
.tab-bar
|
||||
.inset.background(*ngIf='hostApp.platform == Platform.macOS \
|
||||
&& !hostWindow.isFullScreen \
|
||||
&& !hostWindow.isFullscreen \
|
||||
&& config.store.appearance.frame == "thin" \
|
||||
&& (config.store.appearance.tabsLocation == "top" || config.store.appearance.tabsLocation == "left")')
|
||||
.tabs(
|
||||
|
@@ -12,9 +12,9 @@ export interface Bounds {
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class ElectronHostWindow extends HostWindowService {
|
||||
get isFullscreen (): boolean { return this._isFullScreen}
|
||||
get isFullscreen (): boolean { return this._isFullscreen }
|
||||
|
||||
private _isFullScreen = false
|
||||
private _isFullscreen = false
|
||||
|
||||
constructor (
|
||||
zone: NgZone,
|
||||
@@ -23,28 +23,26 @@ export class ElectronHostWindow extends HostWindowService {
|
||||
) {
|
||||
super()
|
||||
electron.ipcRenderer.on('host:window-enter-full-screen', () => zone.run(() => {
|
||||
this._isFullScreen = true
|
||||
this._isFullscreen = true
|
||||
}))
|
||||
|
||||
electron.ipcRenderer.on('host:window-leave-full-screen', () => zone.run(() => {
|
||||
this._isFullScreen = false
|
||||
this._isFullscreen = false
|
||||
}))
|
||||
|
||||
electron.ipcRenderer.on('host:window-shown', () => {
|
||||
zone.run(() => this.windowShown.next())
|
||||
})
|
||||
electron.ipcRenderer.on('host:window-shown', () => zone.run(() => this.windowShown.next()))
|
||||
|
||||
electron.ipcRenderer.on('host:window-close-request', () => {
|
||||
zone.run(() => this.windowCloseRequest.next())
|
||||
})
|
||||
electron.ipcRenderer.on('host:window-close-request', () => zone.run(() => {
|
||||
this.windowCloseRequest.next()
|
||||
}))
|
||||
|
||||
electron.ipcRenderer.on('host:window-moved', () => {
|
||||
zone.run(() => this.windowMoved.next())
|
||||
})
|
||||
electron.ipcRenderer.on('host:window-moved', () => zone.run(() => {
|
||||
this.windowMoved.next()
|
||||
}))
|
||||
|
||||
electron.ipcRenderer.on('host:window-focused', () => {
|
||||
zone.run(() => this.windowFocused.next())
|
||||
})
|
||||
electron.ipcRenderer.on('host:window-focused', () => zone.run(() => {
|
||||
this.windowFocused.next()
|
||||
}))
|
||||
}
|
||||
|
||||
getWindow (): BrowserWindow {
|
||||
@@ -64,7 +62,7 @@ export class ElectronHostWindow extends HostWindowService {
|
||||
}
|
||||
|
||||
toggleFullscreen (): void {
|
||||
this.getWindow().setFullScreen(!this._isFullScreen)
|
||||
this.getWindow().setFullScreen(!this._isFullscreen)
|
||||
}
|
||||
|
||||
minimize (): void {
|
||||
|
Reference in New Issue
Block a user