Skip to content

Commit ad114d7

Browse files
Remove the 🥕 since we have modes in the go to file (microsoft#164437)
Fixes microsoft#163957
1 parent 447e61a commit ad114d7

File tree

3 files changed

+12
-53
lines changed

3 files changed

+12
-53
lines changed

‎src/vs/workbench/browser/layout.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,11 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
167167
}
168168
if (this.isVisible(Parts.TITLEBAR_PART)) {
169169
top += this.getPart(Parts.TITLEBAR_PART).maximumHeight;
170-
quickPickTop = this.titleService.isCommandCenterVisible ? quickPickTop : top;
170+
quickPickTop = top;
171+
}
172+
// If the command center is visible then the quickinput should go over the title bar and the banner
173+
if (this.titleService.isCommandCenterVisible) {
174+
quickPickTop = 0;
171175
}
172176
return { top, quickPickTop };
173177
}

‎src/vs/workbench/browser/parts/titlebar/commandCenterControl.ts

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import { EventLike, reset } from 'vs/base/browser/dom';
6+
import { reset } from 'vs/base/browser/dom';
77
import { BaseActionViewItem, IBaseActionViewItemOptions } from 'vs/base/browser/ui/actionbar/actionViewItems';
88
import { IHoverDelegate } from 'vs/base/browser/ui/iconLabel/iconHoverDelegate';
99
import { setupCustomHover } from 'vs/base/browser/ui/iconLabel/iconLabelHover';
@@ -62,9 +62,6 @@ export class CommandCenterControl {
6262
super.render(container);
6363
container.classList.add('command-center');
6464

65-
const left = document.createElement('span');
66-
left.classList.add('left');
67-
6865
// icon (search)
6966
const searchIcon = renderIcon(Codicon.search);
7067
searchIcon.classList.add('search-icon');
@@ -74,22 +71,13 @@ export class CommandCenterControl {
7471
const labelElement = document.createElement('span');
7572
labelElement.classList.add('search-label');
7673
labelElement.innerText = label;
77-
reset(left, searchIcon, labelElement);
78-
79-
// icon (dropdown)
80-
const right = document.createElement('span');
81-
right.classList.add('right');
82-
const dropIcon = renderIcon(Codicon.chevronDown);
83-
reset(right, dropIcon);
84-
reset(container, left, right);
74+
reset(container, searchIcon, labelElement);
8575

86-
// hovers
87-
this._store.add(setupCustomHover(hoverDelegate, right, localize('all', "Show Search Modes...")));
88-
const leftHover = this._store.add(setupCustomHover(hoverDelegate, left, this.getTooltip()));
76+
const hover = this._store.add(setupCustomHover(hoverDelegate, container, this.getTooltip()));
8977

9078
// update label & tooltip when window title changes
9179
this._store.add(windowTitle.onDidChange(() => {
92-
leftHover.update(this.getTooltip());
80+
hover.update(this.getTooltip());
9381
labelElement.innerText = this._getLabel();
9482
}));
9583
}
@@ -119,22 +107,6 @@ export class CommandCenterControl {
119107

120108
return title;
121109
}
122-
123-
override onClick(event: EventLike, preserveFocus = false): void {
124-
125-
if (event instanceof MouseEvent) {
126-
let el = event.target;
127-
while (el instanceof HTMLElement) {
128-
if (el.classList.contains('right')) {
129-
quickInputService.quickAccess.show('?');
130-
return;
131-
}
132-
el = el.parentElement;
133-
}
134-
}
135-
136-
super.onClick(event, preserveFocus);
137-
}
138110
}
139111

140112
return instantiationService.createInstance(CommandCenterViewItem, action, {});

‎src/vs/workbench/browser/parts/titlebar/media/titlebarpart.css

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -134,35 +134,18 @@
134134
border-color: var(--vscode-commandCenter-inactiveBorder) !important;
135135
}
136136

137-
.monaco-workbench .part.titlebar>.titlebar-container>.window-title>.command-center .action-item.command-center .left {
138-
display: inline-flex;
139-
justify-content: center;
140-
width: 100%;
141-
margin: auto;
142-
overflow: hidden;
143-
text-overflow: ellipsis;
144-
}
145-
146-
.monaco-workbench .part.titlebar>.titlebar-container>.window-title>.command-center .action-item.command-center .left .search-icon {
137+
.monaco-workbench .part.titlebar>.titlebar-container>.window-title>.command-center .action-item.command-center .search-icon {
147138
font-size: 14px;
148139
opacity: .8;
149140
margin: auto 3px;
150141
}
151142

152-
.monaco-workbench .part.titlebar>.titlebar-container>.window-title>.command-center .action-item.command-center .left .search-label {
143+
.monaco-workbench .part.titlebar>.titlebar-container>.window-title>.command-center .action-item.command-center .search-label {
153144
overflow: hidden;
154145
text-overflow: ellipsis;
155146
}
156147

157-
.monaco-workbench .part.titlebar>.titlebar-container>.window-title>.command-center .action-item.command-center .right {
158-
margin-left: auto;
159-
padding: 2px 2px 0 0;
160-
width: 16px;
161-
flex-shrink: 0;
162-
}
163-
164-
.monaco-workbench .part.titlebar>.titlebar-container>.window-title>.command-center .action-item.command-center .left:HOVER,
165-
.monaco-workbench .part.titlebar>.titlebar-container>.window-title>.command-center .action-item.command-center .right:HOVER {
148+
.monaco-workbench .part.titlebar>.titlebar-container>.window-title>.command-center .action-item.command-center:HOVER {
166149
color: var(--vscode-commandCenter-activeForeground);
167150
background-color: var(--vscode-commandCenter-activeBackground);
168151
}

0 commit comments

Comments
 (0)