From c119d3283ece207cdeaa09f8f27427007f2237b5 Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Sat, 20 Feb 2021 19:43:21 +0100 Subject: [PATCH] fixed #3464 --- terminus-core/src/components/tabHeader.component.scss | 9 ++++++--- terminus-core/src/components/tabHeader.component.ts | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/terminus-core/src/components/tabHeader.component.scss b/terminus-core/src/components/tabHeader.component.scss index a1543d5f..b6b8140e 100644 --- a/terminus-core/src/components/tabHeader.component.scss +++ b/terminus-core/src/components/tabHeader.component.scss @@ -6,6 +6,7 @@ $tabs-height: 38px; flex: 1000 1 200px; width: 200px; + padding: 0 10px; &.flex-width { flex: 1000 1 auto; @@ -29,7 +30,6 @@ $tabs-height: 38px; -webkit-app-region: no-drag; cursor: -webkit-grab; - margin-left: 10px; width: 22px; border-radius: 10px; text-align: center; @@ -39,7 +39,7 @@ $tabs-height: 38px; .name { flex: auto; - margin: 0 1px 0 10px; + margin-top: 1px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; @@ -47,6 +47,10 @@ $tabs-height: 38px; align-self: center; } + .index + .name { + margin-left: 10px; + } + button { display: block; flex: none; @@ -60,7 +64,6 @@ $tabs-height: 38px; border-radius: $button-size / 2; line-height: $button-size; align-self: center; - margin-right: 10px; text-align: center; font-size: 20px; diff --git a/terminus-core/src/components/tabHeader.component.ts b/terminus-core/src/components/tabHeader.component.ts index 9369cd42..91f10bcd 100644 --- a/terminus-core/src/components/tabHeader.component.ts +++ b/terminus-core/src/components/tabHeader.component.ts @@ -29,7 +29,7 @@ export class TabHeaderComponent { @Input() @HostBinding('class.has-activity') hasActivity: boolean @Input() tab: BaseTabComponent @Input() progress: number|null - @ViewChild('handle') handle: ElementRef + @ViewChild('handle') handle?: ElementRef private constructor ( public app: AppService, @@ -58,7 +58,7 @@ export class TabHeaderComponent { } ngAfterViewInit () { - if (this.hostApp.platform === Platform.macOS) { + if (this.handle && this.hostApp.platform === Platform.macOS) { this.parentDraggable.setDragHandle(this.handle.nativeElement) } }