This commit is contained in:
Eugene 2023-11-20 23:47:54 +01:00
parent be0d129c28
commit 977deea2a0
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4
2 changed files with 14 additions and 9 deletions

View File

@ -1,5 +1,5 @@
title-bar( title-bar(
*ngIf='ready && !hostWindow.isFullscreen && config.store.appearance.dock == "off" && (config.store.appearance.frame == "full" || (isTilteBarNeeded() && hostApp.platform !== Platform.macOS))', *ngIf='ready && !hostWindow.isFullscreen && config.store.appearance.dock == "off" && isTitleBarNeeded()',
(dblclick)='toggleMaximize()', (dblclick)='toggleMaximize()',
[hideControls]='hostApp.platform !== Platform.Linux && !hostWindow.isFullscreen', [hideControls]='hostApp.platform !== Platform.Linux && !hostWindow.isFullscreen',
[class.inset]='hostApp.platform == Platform.macOS && !hostWindow.isFullscreen' [class.inset]='hostApp.platform == Platform.macOS && !hostWindow.isFullscreen'
@ -9,13 +9,13 @@ title-bar(
*ngIf='ready', *ngIf='ready',
[class.tabs-on-top]='config.store.appearance.tabsLocation == "top" || config.store.appearance.tabsLocation == "left" || config.store.appearance.tabsLocation == "right"', [class.tabs-on-top]='config.store.appearance.tabsLocation == "top" || config.store.appearance.tabsLocation == "left" || config.store.appearance.tabsLocation == "right"',
[class.tabs-on-left]='hasVerticalTabs() && config.store.appearance.tabsLocation == "left"', [class.tabs-on-left]='hasVerticalTabs() && config.store.appearance.tabsLocation == "left"',
[class.tabs-titlebar-enabled]='config.store.appearance.frame == "full" || (isTilteBarNeeded() && hostApp.platform !== Platform.macOS)', [class.tabs-titlebar-enabled]='isTitleBarNeeded()',
[class.tabs-on-right]='hasVerticalTabs() && config.store.appearance.tabsLocation == "right"', [class.tabs-on-right]='hasVerticalTabs() && config.store.appearance.tabsLocation == "right"',
) )
.tab-bar( .tab-bar(
*ngIf='!hostWindow.isFullscreen || config.store.appearance.tabsInFullscreen', *ngIf='!hostWindow.isFullscreen || config.store.appearance.tabsInFullscreen',
[class.tab-bar-no-controls-overlay]='hostApp.platform == Platform.macOS', [class.tab-bar-no-controls-overlay]='hostApp.platform == Platform.macOS',
(dblclick)='toggleMaximize(config.store.appearance.frame == "full" || (isTilteBarNeeded() && hostApp.platform !== Platform.macOS))' (dblclick)='!isTitleBarNeeded() && toggleMaximize()'
) )
.inset.background(*ngIf='hostApp.platform == Platform.macOS \ .inset.background(*ngIf='hostApp.platform == Platform.macOS \
&& !hostWindow.isFullscreen \ && !hostWindow.isFullscreen \

View File

@ -241,13 +241,18 @@ export class AppRootComponent {
.filter(x => x.locations?.includes(aboveZero ? CommandLocation.RightToolbar : CommandLocation.LeftToolbar)) .filter(x => x.locations?.includes(aboveZero ? CommandLocation.RightToolbar : CommandLocation.LeftToolbar))
} }
toggleMaximize (ignore=false): void { toggleMaximize (): void {
if (!ignore) {
this.hostWindow.toggleMaximize() this.hostWindow.toggleMaximize()
} }
}
isTilteBarNeeded (): boolean { protected isTitleBarNeeded (): boolean {
return this.config.store.appearance.frame === 'thin' && this.config.store.appearance.tabsLocation !== 'top' && this.config.store.appearance.tabsLocation !== 'bottom' return (
this.config.store.appearance.frame === 'full'
||
this.hostApp.platform !== Platform.macOS
&& this.config.store.appearance.frame === 'thin'
&& this.config.store.appearance.tabsLocation !== 'top'
&& this.config.store.appearance.tabsLocation !== 'bottom'
)
} }
} }