1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-09-11 13:13:59 +03:00
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(
*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()',
[hideControls]='hostApp.platform !== Platform.Linux && !hostWindow.isFullscreen',
[class.inset]='hostApp.platform == Platform.macOS && !hostWindow.isFullscreen'
@ -9,13 +9,13 @@ title-bar(
*ngIf='ready',
[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-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"',
)
.tab-bar(
*ngIf='!hostWindow.isFullscreen || config.store.appearance.tabsInFullscreen',
[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 \
&& !hostWindow.isFullscreen \

View File

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