Remove the 🥕 since we have modes in the go to file (#164437)

Fixes #163957
This commit is contained in:
Tyler James Leonhardt 2022-11-01 01:40:48 -07:00 committed by GitHub
parent 447e61a31f
commit ad114d7540
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 53 deletions

View file

@ -167,7 +167,11 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
}
if (this.isVisible(Parts.TITLEBAR_PART)) {
top += this.getPart(Parts.TITLEBAR_PART).maximumHeight;
quickPickTop = this.titleService.isCommandCenterVisible ? quickPickTop : top;
quickPickTop = top;
}
// If the command center is visible then the quickinput should go over the title bar and the banner
if (this.titleService.isCommandCenterVisible) {
quickPickTop = 0;
}
return { top, quickPickTop };
}

View file

@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { EventLike, reset } from 'vs/base/browser/dom';
import { reset } from 'vs/base/browser/dom';
import { BaseActionViewItem, IBaseActionViewItemOptions } from 'vs/base/browser/ui/actionbar/actionViewItems';
import { IHoverDelegate } from 'vs/base/browser/ui/iconLabel/iconHoverDelegate';
import { setupCustomHover } from 'vs/base/browser/ui/iconLabel/iconLabelHover';
@ -62,9 +62,6 @@ export class CommandCenterControl {
super.render(container);
container.classList.add('command-center');
const left = document.createElement('span');
left.classList.add('left');
// icon (search)
const searchIcon = renderIcon(Codicon.search);
searchIcon.classList.add('search-icon');
@ -74,22 +71,13 @@ export class CommandCenterControl {
const labelElement = document.createElement('span');
labelElement.classList.add('search-label');
labelElement.innerText = label;
reset(left, searchIcon, labelElement);
reset(container, searchIcon, labelElement);
// icon (dropdown)
const right = document.createElement('span');
right.classList.add('right');
const dropIcon = renderIcon(Codicon.chevronDown);
reset(right, dropIcon);
reset(container, left, right);
// hovers
this._store.add(setupCustomHover(hoverDelegate, right, localize('all', "Show Search Modes...")));
const leftHover = this._store.add(setupCustomHover(hoverDelegate, left, this.getTooltip()));
const hover = this._store.add(setupCustomHover(hoverDelegate, container, this.getTooltip()));
// update label & tooltip when window title changes
this._store.add(windowTitle.onDidChange(() => {
leftHover.update(this.getTooltip());
hover.update(this.getTooltip());
labelElement.innerText = this._getLabel();
}));
}
@ -119,22 +107,6 @@ export class CommandCenterControl {
return title;
}
override onClick(event: EventLike, preserveFocus = false): void {
if (event instanceof MouseEvent) {
let el = event.target;
while (el instanceof HTMLElement) {
if (el.classList.contains('right')) {
quickInputService.quickAccess.show('?');
return;
}
el = el.parentElement;
}
}
super.onClick(event, preserveFocus);
}
}
return instantiationService.createInstance(CommandCenterViewItem, action, {});

View file

@ -134,35 +134,18 @@
border-color: var(--vscode-commandCenter-inactiveBorder) !important;
}
.monaco-workbench .part.titlebar>.titlebar-container>.window-title>.command-center .action-item.command-center .left {
display: inline-flex;
justify-content: center;
width: 100%;
margin: auto;
overflow: hidden;
text-overflow: ellipsis;
}
.monaco-workbench .part.titlebar>.titlebar-container>.window-title>.command-center .action-item.command-center .left .search-icon {
.monaco-workbench .part.titlebar>.titlebar-container>.window-title>.command-center .action-item.command-center .search-icon {
font-size: 14px;
opacity: .8;
margin: auto 3px;
}
.monaco-workbench .part.titlebar>.titlebar-container>.window-title>.command-center .action-item.command-center .left .search-label {
.monaco-workbench .part.titlebar>.titlebar-container>.window-title>.command-center .action-item.command-center .search-label {
overflow: hidden;
text-overflow: ellipsis;
}
.monaco-workbench .part.titlebar>.titlebar-container>.window-title>.command-center .action-item.command-center .right {
margin-left: auto;
padding: 2px 2px 0 0;
width: 16px;
flex-shrink: 0;
}
.monaco-workbench .part.titlebar>.titlebar-container>.window-title>.command-center .action-item.command-center .left:HOVER,
.monaco-workbench .part.titlebar>.titlebar-container>.window-title>.command-center .action-item.command-center .right:HOVER {
.monaco-workbench .part.titlebar>.titlebar-container>.window-title>.command-center .action-item.command-center:HOVER {
color: var(--vscode-commandCenter-activeForeground);
background-color: var(--vscode-commandCenter-activeBackground);
}