mirror of
https://github.com/Eugeny/tabby.git
synced 2025-03-01 15:06:27 +08:00
fixed glitchy window drag in macOS - fixes #4324
This commit is contained in:
parent
3b09dfa145
commit
4e4788bf57
@ -182,17 +182,6 @@ export class AppRootComponent {
|
||||
return this.config.store.appearance.tabsLocation === 'left' || this.config.store.appearance.tabsLocation === 'right'
|
||||
}
|
||||
|
||||
onTabDragStart (tab: BaseTabComponent) {
|
||||
this.app.emitTabDragStarted(tab)
|
||||
}
|
||||
|
||||
onTabDragEnd () {
|
||||
setTimeout(() => {
|
||||
this.app.emitTabDragEnded()
|
||||
this.app.emitTabsChanged()
|
||||
})
|
||||
}
|
||||
|
||||
async generateButtonSubmenu (button: ToolbarButton) {
|
||||
if (button.submenu) {
|
||||
button.submenuItems = await button.submenu()
|
||||
|
@ -2,13 +2,17 @@
|
||||
.progressbar([style.width]='progress + "%"', *ngIf='progress != null')
|
||||
.activity-indicator(*ngIf='tab.activity$|async')
|
||||
|
||||
ng-container(*ngIf='!config.store.terminal.hideTabIndex')
|
||||
.index(*ngIf='hostApp.platform === Platform.macOS', cdkDragHandle) {{index + 1}}
|
||||
.index(*ngIf='hostApp.platform !== Platform.macOS') {{index + 1}}
|
||||
.index(*ngIf='!config.store.terminal.hideTabIndex && hostApp.platform === Platform.macOS', cdkDragHandle) {{index + 1}}
|
||||
.index(*ngIf='!config.store.terminal.hideTabIndex && hostApp.platform !== Platform.macOS') {{index + 1}}
|
||||
|
||||
.name(
|
||||
[title]='tab.customTitle || tab.title',
|
||||
[class.no-hover]='config.store.terminal.hideCloseButton'
|
||||
cdkDrag,
|
||||
cdkDragRootElement='tab-header',
|
||||
[cdkDragData]='tab',
|
||||
(cdkDragStarted)='onTabDragStart(tab)',
|
||||
(cdkDragEnded)='onTabDragEnd()',
|
||||
) {{tab.customTitle || tab.title}}
|
||||
button(*ngIf='!config.store.terminal.hideCloseButton',(click)='app.closeTab(tab, true)') ×
|
||||
|
||||
|
@ -72,6 +72,17 @@ export class TabHeaderComponent extends BaseComponent {
|
||||
return items.slice(1)
|
||||
}
|
||||
|
||||
onTabDragStart (tab: BaseTabComponent) {
|
||||
this.app.emitTabDragStarted(tab)
|
||||
}
|
||||
|
||||
onTabDragEnd () {
|
||||
setTimeout(() => {
|
||||
this.app.emitTabDragEnded()
|
||||
this.app.emitTabsChanged()
|
||||
})
|
||||
}
|
||||
|
||||
@HostBinding('class.flex-width') get isFlexWidthEnabled (): boolean {
|
||||
return this.config.store.appearance.flexTabs
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user