Skip to content

Commit 5d4e856

Browse files
committed
start growing when width is big enough
1 parent 109c519 commit 5d4e856

2 files changed

Lines changed: 14 additions & 5 deletions

File tree

src/vs/workbench/contrib/markers/browser/markersPanelActions.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ export class MarkersFilterAction extends Action {
116116
}
117117

118118
layout(width: number): void {
119-
if (width < 400) {
119+
if (width > 600) {
120+
this.class = 'markers-panel-action-filter grow';
121+
} else if (width < 400) {
120122
this.class = 'markers-panel-action-filter small';
121123
} else {
122124
this.class = 'markers-panel-action-filter';
@@ -133,6 +135,7 @@ export interface IMarkerFilterController {
133135
export class MarkersFilterActionViewItem extends BaseActionViewItem {
134136

135137
private delayedFilterUpdate: Delayer<void>;
138+
private container: HTMLElement | null = null;
136139
private filterInputBox: HistoryInputBox | null = null;
137140
private filterBadge: HTMLElement | null = null;
138141
private focusContextKey: IContextKey<boolean>;
@@ -154,9 +157,10 @@ export class MarkersFilterActionViewItem extends BaseActionViewItem {
154157
}
155158

156159
render(container: HTMLElement): void {
157-
DOM.addClass(container, 'markers-panel-action-filter-container');
160+
this.container = container;
161+
DOM.addClass(this.container, 'markers-panel-action-filter-container');
158162

159-
this.element = DOM.append(container, DOM.$(''));
163+
this.element = DOM.append(this.container, DOM.$(''));
160164
this.element.className = this.action.class || '';
161165
this.createInput(this.element);
162166
this.createControls(this.element);
@@ -303,8 +307,9 @@ export class MarkersFilterActionViewItem extends BaseActionViewItem {
303307
}
304308

305309
protected updateClass(): void {
306-
if (this.element) {
310+
if (this.element && this.container) {
307311
this.element.className = this.action.class || '';
312+
DOM.toggleClass(this.container, 'grow', DOM.hasClass(this.element, 'grow'));
308313
this.adjustInputBox();
309314
}
310315
}

src/vs/workbench/contrib/markers/browser/media/markers.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
.monaco-action-bar .action-item.markers-panel-action-filter-container {
7-
flex: 1;
87
cursor: default;
98
display: flex;
109
}
@@ -52,6 +51,11 @@
5251
margin-right: 10px;
5352
}
5453

54+
.markers-panel-container .monaco-action-bar.markers-panel-filter-container .action-item.markers-panel-action-filter-container,
55+
.panel > .title .monaco-action-bar .action-item.markers-panel-action-filter-container.grow {
56+
flex: 1;
57+
}
58+
5559
.markers-panel .markers-panel-container {
5660
height: 100%;
5761
}

0 commit comments

Comments
 (0)