make titlebar double-click maximize window on macOS - fixes #4754

This commit is contained in:
Eugene Pankov 2021-10-28 09:26:32 +02:00
parent 3109ea0220
commit 7be3904123
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4
2 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,6 @@
title-bar(
*ngIf='ready && !hostWindow.isFullscreen && config.store.appearance.frame == "full" && config.store.appearance.dock == "off"',
(dblclick)='hostWindow.toggleMaximize()',
[class.inset]='hostApp.platform == Platform.macOS && !hostWindow.isFullscreen'
)
@ -8,7 +9,7 @@ title-bar(
[class.tabs-on-top]='config.store.appearance.tabsLocation == "top" || config.store.appearance.tabsLocation == "left"',
[class.tabs-on-side]='hasVerticalTabs()',
)
.tab-bar
.tab-bar((dblclick)='hostWindow.toggleMaximize()')
.inset.background(*ngIf='hostApp.platform == Platform.macOS \
&& !hostWindow.isFullscreen \
&& config.store.appearance.frame == "thin" \

View File

@ -88,8 +88,9 @@ export class TabHeaderComponent extends BaseComponent {
return this.config.store.appearance.flexTabs
}
@HostListener('dblclick') onDoubleClick (): void {
@HostListener('dblclick', ['$event']) onDoubleClick ($event: MouseEvent): void {
this.showRenameTabModal()
$event.stopPropagation()
}
@HostListener('mousedown', ['$event']) async onMouseDown ($event: MouseEvent) {