mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-16 09:29:59 +00: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'
|
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) {
|
async generateButtonSubmenu (button: ToolbarButton) {
|
||||||
if (button.submenu) {
|
if (button.submenu) {
|
||||||
button.submenuItems = await button.submenu()
|
button.submenuItems = await button.submenu()
|
||||||
|
@ -2,13 +2,17 @@
|
|||||||
.progressbar([style.width]='progress + "%"', *ngIf='progress != null')
|
.progressbar([style.width]='progress + "%"', *ngIf='progress != null')
|
||||||
.activity-indicator(*ngIf='tab.activity$|async')
|
.activity-indicator(*ngIf='tab.activity$|async')
|
||||||
|
|
||||||
ng-container(*ngIf='!config.store.terminal.hideTabIndex')
|
.index(*ngIf='!config.store.terminal.hideTabIndex && hostApp.platform === Platform.macOS', cdkDragHandle) {{index + 1}}
|
||||||
.index(*ngIf='hostApp.platform === Platform.macOS', cdkDragHandle) {{index + 1}}
|
.index(*ngIf='!config.store.terminal.hideTabIndex && hostApp.platform !== Platform.macOS') {{index + 1}}
|
||||||
.index(*ngIf='hostApp.platform !== Platform.macOS') {{index + 1}}
|
|
||||||
|
|
||||||
.name(
|
.name(
|
||||||
[title]='tab.customTitle || tab.title',
|
[title]='tab.customTitle || tab.title',
|
||||||
[class.no-hover]='config.store.terminal.hideCloseButton'
|
[class.no-hover]='config.store.terminal.hideCloseButton'
|
||||||
|
cdkDrag,
|
||||||
|
cdkDragRootElement='tab-header',
|
||||||
|
[cdkDragData]='tab',
|
||||||
|
(cdkDragStarted)='onTabDragStart(tab)',
|
||||||
|
(cdkDragEnded)='onTabDragEnd()',
|
||||||
) {{tab.customTitle || tab.title}}
|
) {{tab.customTitle || tab.title}}
|
||||||
button(*ngIf='!config.store.terminal.hideCloseButton',(click)='app.closeTab(tab, true)') ×
|
button(*ngIf='!config.store.terminal.hideCloseButton',(click)='app.closeTab(tab, true)') ×
|
||||||
|
|
||||||
|
@ -72,6 +72,17 @@ export class TabHeaderComponent extends BaseComponent {
|
|||||||
return items.slice(1)
|
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 {
|
@HostBinding('class.flex-width') get isFlexWidthEnabled (): boolean {
|
||||||
return this.config.store.appearance.flexTabs
|
return this.config.store.appearance.flexTabs
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user