mirror of
https://github.com/Eugeny/tabby.git
synced 2024-11-27 06:00:26 +08:00
cleanup
This commit is contained in:
parent
be0d129c28
commit
977deea2a0
@ -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 \
|
||||
|
@ -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'
|
||||
)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user